Link to home
Start Free TrialLog in
Avatar of MelissaC
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();

ASKER CERTIFIED SOLUTION
Avatar of migel
migel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial