OpenCV3.4.7,我在使用cv::String::format()方法時候對string英文的格式化輸出回傳亂碼
對英文字符常量輸出正常
string imgname;
string imgname1;
string imgPath;
string imgPath1;
imgPath = format("G:\\%s", "DSC02930.JPG");//對英文字符常量輸出正常
cout << imgname <<endl;
cout << imgPath<<endl;
imgPath1 = format("G:\\%s", imgname1);//對string英文的格式化輸出回傳亂碼
cout << imgname1 << endl;
cout << imgPath1 << endl;
輸出結果:

求教原因
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/100325.html
標籤:工具平臺和程序庫
上一篇:c語言的坑 誰來幫我填?
