what is the exact problem? how to do file IO in C++? see
http://www.cplusplus.com/doc/tutorial/files.html
how to manipulate strings to form file names? see
http://www.cplusplus.com/doc/tutorial/ntcs.html
I have a file in which there are a list of keywords like
AB123
AB124
AB125
AB126
AB127
AB128
AB129
AB130
AB131
AB132
AB133
Then i have to extract each keyword for example AB123 and create a file with name AB123.txt (and insert some other information which i will do).
So i needed help in creating file names .In C++ i am creating first filename as follows
string substring="AB123";
string Path="/root/praveen/";
string ext=".txt";
string filename=Path+substring+ext;
ofstream Myfile;
Myfile.open(filename.c_str());
So this type i create first file AB123.txt
Next how to create Second file AB124.txt . Should i use a for loop and take new file handlers each time in the loop for creation of a file.
Finally as solution i have to get the following files to be created:
AB123.txt
AB124.txt
AB125.txt
AB126.txt
AB127.txt
AB128.txt
AB129.txt
AB130.txt
AB131.txt
AB132.txt
AB133.txt
Please Help me
Thanks in Advance
Praveen