Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with CFile!!!

Status
Not open for further replies.

sergelaurent

Technical User
May 30, 2005
52
0
0
FR
I am actually using the CFile.open command to open a file. However, I would like to write in this file without replacing existing caracters.

Does anybody know in which mode I should open this File or I shoud use the seekToEnd command each time?
 
Open using [tt]CFile::modeCreate | CFile::modeNoTruncate | CFile::modeWrite[/tt] (or possibly, [tt]CFile::modeReadWrite[/tt], if that's what you need). Then you must do [tt]seekToEnd()[/tt] before writing to the file.
Hope this helps.
See: [URL unfurl="true"]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cfile_class_members.asp[/url] for more information.

[tt]_______________________________________
Roger [pc2]
The Eileens are out there[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top