CString fullPath = path.TrimRight(_T("\\")) + _T("\\") + fileName;
string strPath = LQAS_DATA::CStringToString(fullPath);
locale::global(locale(""));
fstream ofile(strPath.c_str() ,ios_base::out | ios_base::trunc | ios_base::binary);
if(ofile.fail())
{
locale::global(locale("C"));
return false;;
}
ofile<< output;
locale::global(locale("C"));
ofile.close();
转载于:https://www.cnblogs.com/linyimin/archive/2013/03/13/2957104.html