title: Deleting images from a file with c++
body: <p>I want to delete images from a file, the images are named: "1.jpg, 2.jpg ....", i have tried the code above but it gives me this error: no matching function for call to 'remove(std::__cxx11::string&amp;)'</p>
  
  <pre><code> int i;
   for (i=0;i&lt;frame;i++)//frame contain the number of images i want to delete
   {
        std::stringstream ss;
       ss &lt;&lt; i;
       std::string str = ss.str();
       const char *cstr = str.c_str();
       str=str+".jpg";
       remove(str);
   }
  </code></pre>
  
  <p>If someone can help thank you in advence.</p>