title: imwrite sequence of images in a folder in opencv
body: <p>Using VS 2010 in C++ and tried to put this in a for loop</p>
  
  <pre><code>String filename = "cropped_" + (ct+1);
  imwrite(filename + ".jpg", img_cropped);
  </code></pre>
  
  <p>These are the filenames that came out:</p>
  
  <pre><code>ropped_.jpg
  opped_.jpg
  pped_.jpg
  </code></pre>
  
  <p>How do I do it? And how do I put them in a folder in the same directory as my source code?</p>