I have a dialog based application.I use a text box in it.what i want is write the details from that text box into a text file.
when i wrote the code ,the data written into the file was as follows..慨獮a﷽﷽楢畮ﴀ﷽ý晧晧ﴀ﷽ý
My code is,
CString str;
GetDlgItemText(IDC_EDIT1,str);
fstream f;
f.open("C:\\myfile.txt",ios::app);
f.write((LPCTSTR)str,10);
f.close();
Any error...???if so please help me to correct it....i use vc++