to_string是c++11的新方法 可以将数值类型很轻松的转换为字符串类型。
解决办法
在Dev C++菜单栏:
“工具”–“编译选项”–“编译器”
勾选“编译时加入以下命令”,并加入下面代码: -std=c++
使用
头文件 #include
int sum=100;
string num=to_string(sum); //将整形转换成字符串
最后
以上就是含糊流沙最近收集整理的关于‘to_string‘ was not declared in this scope的全部内容,更多相关‘to_string‘内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复