Trying to append to a file?

I have the following member function.  
And I cant seem to figure out how to append data to the end of the file.  It overrides everyting.

void CGSPMSDBAccess::saveSQLT( _bstr_t sValue, LPCSTR sTitle )
      std::string strValue;

      strValue = (LPCSTR)sValue;

      ofstream handleWriteToFile; "c:\\temp\\gspmssqloutput.txt", ios::out );

      if( handleWriteToFile )
            handleWriteToFile << sTitle << ":  " << strValue << '\r' << endl;



Any ideas on how to open the file and append to new data to the end of the file?

Who is Participating?
BigOneConnect With a Mentor Commented:
You've got to use the "ios::ate" style, not the "ios::out"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.