C/C++中讀取中文路徑文件的方法

轉自 http://apps.hi.baidu.com/share/detail/33007444 ios 有時候用ifstream或ofstream打開帶有中文路徑的文件會失敗。app 解決辦法: 一、使用C語言的函數設置爲中文運行環境 setlocale(LC_ALL,"Chinese-simplified");函數 二、使用STL函數設置爲系統語言環境 std::locale::global
相關文章
相關標籤/搜索