FStream and Chinese path

xiaoxiao2021-04-08  392

problem:

Sometimes files that open with the Chinese path with ifstream or OFStream will fail.

Workaround: 1. Use the C language function to set to Chinese running environment setLocale (lc_all, "chinese-simplified");

2. Set the STL function to the System Language Environment Std :: LOCALE :: Global (std :: locale ("");

Of course, 2!

转载请注明原文地址:https://www.9cbs.com/read-132678.html

New Post(0)