I already did some programming with C++ by implementing different formulas in dll files and so I want to use C++ for other operations. Now we have to deal with large textfiles with million of lines (numbers) in the format:
2,3,4
5,4,6
4,7,9
...
...
I want to open the text file (this is no problem), delete for example every 10th line, and write the results to a new text file.
Can someone give me a short example code for this?
Thank you vey much,
You need to first include fstream & string header files.. then you need to create an ifstream and then to open the file, check if it is open, and if it is open start manipulating the file gathering the informations you require (with getline() for lines) and when you're done close that file then initialize the ofstream and open the file where you want to write the result then close this one too....