Advertising (This ad goes away for registered users. You can Login or Register)

text files

Programming on your favorite platform, for your favorite platform? Post here
Locked
varun
Banned
Posts: 651
Joined: Thu Jan 27, 2011 12:32 pm
Location: Mars

text files

Post by varun »

hello everyone.i was making a game srabble in which i could search from dictionary.
i have come across times when words werent present in in it.

so i thought of adding them. but with ofstream, the words were replaced not added.

Can anyone please tell me how to add a new line at end of text file please
Advertising
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: text files

Post by m0skit0 »

Set append flag when opening the file.

http://www.cplusplus.com/reference/iost ... ream/open/
Advertising
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
varun
Banned
Posts: 651
Joined: Thu Jan 27, 2011 12:32 pm
Location: Mars

Re: text files

Post by varun »

thank you,very useful link
Locked

Return to “Programming”