I'm pretty new to C++, and i was wondering if i could make a program to open a .txt file, and then delete something in it and type something new instead. It would be alot easier to help my friend, if i just could send him a .exe instead og giving him a trip through 50 folders, and then make him open a file and write something.. :)
I would like to know if i could make a program to move files or create new ones (thinking of .txt atm).
i was wondering if i could make a program to open a .txt file, and then delete something in it and type something new instead.
Sounds like you need ifstream( read from the file ) and ofstream( write to the file ). There is a downside. You cannot modify a piece of information within a file. What you need to do is this: Open the file, extract it's contents, modify the piece of information you want, then place all of the information back into the file.
References:
http://www.cplusplus.com/reference/iostream/ifstream/
http://www.cplusplus.com/reference/iostream/ofstream/