CString a( "text" );
ofstream outfile(_T( "1.txt "));
1.使用fstream.h的时候使用OutFile << a。
2.使用fstream或项目的编码方式为UNICODE的时候OutFile << a,输出的是十六进制的地址,需要转换一下OutFile << (LPCTSTR)a。
CString a( "text" );
ofstream outfile(_T( "1.txt "));
1.使用fstream.h的时候使用OutFile << a。
2.使用fstream或项目的编码方式为UNICODE的时候OutFile << a,输出的是十六进制的地址,需要转换一下OutFile << (LPCTSTR)a。