MelissaC
asked on
Easy: Append line to CStdioFile
Here's an easy one for you experts...
I need to open a file and append one line to it. I tried the following code, but it just overwrites the text in the file:
CStdioFile objFile( (LPCTSTR) m_strCurrentExportFile, CFile::modeCreate |CFile::modeWrite |CFile::typeText );
objFile.SeekToEnd();
objFile.WriteString( (LPCTSTR) strOutput );
objFile.Close();
I need to open a file and append one line to it. I tried the following code, but it just overwrites the text in the file:
CStdioFile objFile( (LPCTSTR) m_strCurrentExportFile, CFile::modeCreate |CFile::modeWrite |CFile::typeText );
objFile.SeekToEnd();
objFile.WriteString( (LPCTSTR) strOutput );
objFile.Close();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.