wofstream输出wstring

Posted on 2008-10-25 12:24  活着就是幸福  阅读(795)  评论(0编辑  收藏  举报

std::wofstream fout( filename.c_str(),  std::ios::out );  
fout.imbue(std::locale(
"chs"));
fout
<<somestring;