ofstream 解决中文路径问题
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 ));
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询