在移植linux代码到 freebsd 系统时,出现各种错误。现将所有错误一一罗列下来,并给出相关的解决方案。
to_string is not a member of std
编辑如下文件 test.cpp
#include <string>
using namespace std;
int main()
{
string s = std::to_string(42);
cout << s << endl;
return 0;
}
编译指令:
gcc -std=c++11 test.cpp test
会报错:
test.cpp: In function 'int main()':
test.cpp:6:18: error: 'to