I need to write back to the beginning of a file with overwritting it.
Currently it opens without truncation but writes to the end of the file. How can I set it to the beginning?
thanxCode:outfile.open(fileName, ios::in|ios::nocreate|ios::app);
I need to write back to the beginning of a file with overwritting it.
Currently it opens without truncation but writes to the end of the file. How can I set it to the beginning?
thanxCode:outfile.open(fileName, ios::in|ios::nocreate|ios::app);
Remove the ios::app flag.
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials