好吧,我有
tmp.cpp:
#include <string>
int main()
{
std::to_string(0);
return 0;
}
但当我try 编译时,我得到:
$ g++ tmp.cpp -o tmp
tmp.cpp: In function ‘int main()’:
tmp.cpp:5:5: error: ‘to_string’ is not a member of ‘std’
std::to_string(0);
^
我正在运行g++版本4.8.1.与我在那里发现的所有其他关于这个错误的引用不同,我not岁使用MinGW,我在Linux(3.11.2)上.
知道为什么会这样吗?这是我的标准行为,还是我做错了什么,还是哪里有漏洞?