title: how to read multiple txt files in c++ in a specified format.?
body: <p>I have a code in C++ that reads multiple txt files from a directory. But the files are in a specifies format, i.e abc01.txt, abc02.txt, abc03.txt....., abc99.txt.</p>
  
  <p>I can read the file in the format, abc1.txt, abc2.txt, abc3.txt....., abc99.txt. Using my code. Problem is i cant read the integer value 01 to 09.</p>
  
  <p>Please help me how can I edit my code and read all the files.</p>
  
  <p>My code:</p>
  
  <pre><code> for(files=1;files&lt;=counter;files++)
    {   stringstream out;
        out&lt;&lt;files;
         infile="./input/abc"+out.str()+".txt";
                input.open(infile.c_str());
    }
  </code></pre>