编译指令
# g++ picture.cpp -o test
报告错误
error: ‘to_string’ is not a member of ‘std’
解决方法
添加-std=c++11 选项,
# g++ -std=c++11 picture.cpp –o test
问题原因
to_string在新版本的C++11中才被支持,所以,这里在编译的时候添加了C++11的支持选项。
编译指令
# g++ picture.cpp -o test
报告错误
error: ‘to_string’ is not a member of ‘std’
解决方法
添加-std=c++11 选项,
# g++ -std=c++11 picture.cpp –o test
问题原因
to_string在新版本的C++11中才被支持,所以,这里在编译的时候添加了C++11的支持选项。