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.
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.
Please help me how can I edit my code and read all the files.
My code:
for(files=1;files<=counter;files++) { stringstream out; out<<files; infile="./input/abc"+out.str()+".txt"; input.open(infile.c_str()); }