|
-
January 10th, 2005, 03:54 PM
#1
Overwrite a file's contents
Hi,
Can anybody suggest away to completely overwrite the contents of a text file with some new text?
Thanks very much,
dlarkin77
-
January 10th, 2005, 04:13 PM
#2
Re: Overwrite a file's contents
Code:
CStdioFile fl;
if(fl.Open("C:\\temp\\MyFile.txt", CFile::shareExclusive | CFile::modeWrite | CFile::modeCreate))
{
fl.WriteString("My New Text!\n");
fl.Close();
}
--EJMW
-
January 10th, 2005, 04:47 PM
#3
Re: Overwrite a file's contents
Thanks very much ejmw. Much appreciated.
dlarkin77
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|