I need some code on file input and output. On how to change the data in the file especially numbers. Thanks for all your help!
Printable View
I need some code on file input and output. On how to change the data in the file especially numbers. Thanks for all your help!
In broad terms you either use file pointers (C) or streams (C++, can use file pointers here too if you want). I suggest you read up on these topics in an online text such as Liberty's Teach Yourself C++ in 21 days, available at several sites.
In order to manipulate files you need to read the data into your program, manipulate it, then write it back to the file.
In order to accuratley read the file, you need to know the specifics of how it is set up.