Error stoi was not declared in this scope

  • [Error] ‘stoi’ was not declared in this scope
    一般是DEV没有设置C++11的编译环境:
    设置步骤:
    工具-> 编译选项 -> 加入-std=c++11;
    Error stoi was not declared in this scope
    然后点击代码生成/优化-> 代码生成 -> 在标准语言中 选择ISO C++11。

Error stoi was not declared in this scope
PS:如果你依旧还没有解决话,可能是你的DEV版本的问题。
Error stoi was not declared in this scope
比如我这个版本的是蓝桥竞赛的版本,有些函数不能用。
Error stoi was not declared in this scope
这个最新版本。

不过,难受的是,新版的调试功能又让人头疼!!!
Error stoi was not declared in this scope
首先要把生成代码性能分析信息设置成YES.
Error stoi was not declared in this scope
然后在gcc和g++中加入-D_DEBUG_
Error stoi was not declared in this scope
PS:有些博主的文章中写了要在编译器中两个命令框中都加入-g3.我开始加入一直还是不能调试,一直报错,删掉之后却可以调试,具体我也没摸清楚怎么回事,如果你的不成功可以试试这个。
Error stoi was not declared in this scope
==另外比较重要的是:==修改好设置后,一定要重启DEV再进行编译调试。
PS:有些博主的文章中说到,需要将cpp文件放入到devcpp文件夹中,我照着尝试了,好像能有效果。
总的来说,只要是能试试的方法都尝试了,还好最终解决了问题。
希望我的文章可以帮助到跟我有一样烦恼的人。

勉励:
打卡第十一天,加油ヾ(◍°∇°◍)ノ゙

这几天没有怎么写博客,一直都在忙开学志愿者相关的事情,2020年这个特殊的一年。
如果觉得我的文章对你有所帮助与启发,点赞给我个鼓励吧(づ ̄3 ̄)づ╭❤~Error stoi was not declared in this scope
关注我和我一起共勉加油吧!
如果文章有错误,还望不吝指教!