Computer Science Canada

Manipulating File Data

Author:  Army_Hermet6312 [ Wed Nov 19, 2008 11:27 am ]
Post subject:  Manipulating File Data

the compiler i'm using is VC++ 6

i am making a program that reads information from a file, what i'm wondering is if there is any way that i can overwrite data in that file.

for example if there is a 1 in a txt file could i erase that and put a 2?

thanks Very Happy

Author:  S_Grimm [ Wed Nov 19, 2008 11:30 am ]
Post subject:  RE:Manipulating File Data

you'd have to scan the document, find the numbers and have a bunch of if statements that say to replace it. There is a tutorial around here somewhere on doing that.......

Author:  btiffin [ Wed Nov 19, 2008 3:19 pm ]
Post subject:  RE:Manipulating File Data

Yes. No. Depends. Wink

Check out http://www.cplusplus.com/doc/tutorial/files.html for some deets.

Cheers


: