I have some data I am sending to a file using the CFile class. I want it to start a new line after every piece of data. How do I do this?
some of my code:
CFile LoginFileWrite;
LoginFileWrite.Open("login.txt",CFile::modeWrite);
CString NewName;
CString NewPass;
CString NewData;
NewName = m_NewName;
NewPass = m_NewPass;
NewData.Format(NewName + " " + NewPass);
int NewDataLen;
NewDataLen = NewData.GetLength();
LoginFileWrite.SeekToEnd();
LoginFileWrite.Write(NewData, NewDataLen);
LoginFileWrite.Close();
some of my code:
CFile LoginFileWrite;
LoginFileWrite.Open("login.txt",CFile::modeWrite);
CString NewName;
CString NewPass;
CString NewData;
NewName = m_NewName;
NewPass = m_NewPass;
NewData.Format(NewName + " " + NewPass);
int NewDataLen;
NewDataLen = NewData.GetLength();
LoginFileWrite.SeekToEnd();
LoginFileWrite.Write(NewData, NewDataLen);
LoginFileWrite.Close();