Overwriting data from text file

Hello guys..
I am very new to programming and i just learnt about text file a week ago..
im doing a mini project for my school work... and im trying to overwrite the data from the existing text file..i have no idea how to start... im stuck at that...is it possible for me to get a tip or two from here?? it would be really great..

thank you.. :D
You designate how to treat the existing data in the file when you set the open mode flag on the fstream object. For example, if you want to overwrite an existing file, then you would use the 'std::ios_base::trunc' flag: http://www.cplusplus.com/reference/ios/ios_base/openmode/
Topic archived. No new replies allowed.