Using wfstream i am trying to write some processed content removing the old contents from file.
wfstream cSrcFileOutput(m_cstrFile);
wfstream cSrcFileInput(m_cstrFile);
std::wstring cstrSrcFileContent;
....
cstrSrcFileContent has my content
I am writing as below :
cSrcFileOutput.write(cstrSrcFileContent.c_str(), cstrSrcFileContent.size()*sizeof(wchar_t));
The problem is it's not clearing the previous data. instead it's inserting processed content somewhere in the file.
I want the old content replaced with the new processed content.
Please suggest.