要使用to_wstring函数,必须在编译时指定C++11标准。可以采用以下两种方法之一解决:
g++ -std=c++11 main.cpp -o main
#include
这将包含to_wstring所需的头文件,并解决此错误。
上一篇:编译错误:'collect2:error:ldreturned1exitstatus,undefinedreference”
下一篇:编译错误:'error:badoperandtypesforbinaryoperator'+'iamnotgettingwhereiamwrong”