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
Post Reply
User avatar
varun
Banned
Posts: 651
Joined: Thu Jan 27, 2011 12:32 pm
Location: Mars

text files

Post by varun » Tue Jan 10, 2012 5:42 am

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

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: text files

Post by m0skit0 » Tue Jan 10, 2012 8:25 am

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"

User avatar
varun
Banned
Posts: 651
Joined: Thu Jan 27, 2011 12:32 pm
Location: Mars

Re: text files

Post by varun » Tue Jan 10, 2012 4:59 pm

thank you,very useful link

Post Reply

Return to “Programming”