1.右击当前项目 -> properties -> C/C++ Build -> settings -> 右边的toolsettings窗口 -> gcc c++ complier -> miscellaneous -> 在other flags输入框末尾添加 -std=c++0x
2.右击当前项目 -> properties -> C/C++ General -> Preprocessor include -> 右边的provider窗口 ->CDT GCC Build-in Compiler Settings -> 在Commans to get compiler sepcs初末尾添加-std=c++0x
3.apply , ok
4.选中当前项目,在IDE的菜单栏(不是右键项目后的菜单)的Project -> C/C++ Index -> Re-resolve Unresloved Includes即可.
参考链接:
http://tangmingjie2009.iteye.com/blog/2089083
本文详细介绍如何在项目中配置C++11标准,通过修改编译器设置和预处理器指令来启用C++11特性,确保代码可以正确编译。

473

被折叠的 条评论
为什么被折叠?



