解决std::ofstream操作中文路径下文件的问题

filePath = 文件绝对路径

std::locale loc = std::locale::global(std::locale(""));
        std::ostream* logFile = new std::ofstream(filePath)
        std::locale::global(std::locale(loc ));

转载于:https://www.cnblogs.com/skydesign/archive/2011/03/29/1998893.html

你可能感兴趣的:(解决std::ofstream操作中文路径下文件的问题)