您的位置:首页 > 其它

ofstream 解决中文路径问题

2011-07-01 10:41 246 查看
std::locale loc = std::locale::global(std::locale(""));
ofstream testOFstream("C:\\测试.txt");
if (testOFstream.is_open())
{
testOFstream<<"this is a test\n";
testOFstream<<"this is another test";
testOFstream.close();
}
std::locale::global(std::locale(loc ));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: