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 ));
|
ofstream 支持中文
最新推荐文章于 2023-04-19 01:03:43 发布