问题一:使用unordered_map错误
问题描述
包含头文件#include <unordered_map>
后编译器报错,错误信息为:
This file requires compiler and library support for the \ISO C++ 2011 standard. This support is currently experimental, and must be \enabled with the -std=c++11 or -std=gnu++11 compiler options.
该错误来自文件:c++0x_warning.h中的
#ifndef _CXX0X_WARNING_H
#define _CXX0X_WARNING_H 1
#if __cplusplus < 201103L
#error This file requires compiler and library support for the \
ISO C++ 2011 standard. This support is currently experimental, and must be \
enabled with the -std=c++11 or -std=gnu++11 compiler options.
#endif
#endif
解决方案
点击Settings-Compiler,弹出如下窗口:
勾选上上图红色方框中的任意一项。
问题二:智能缩进
问题描述
Ubuntu14.04下,codeblocks勾选上smartindent之后只能缩进仍然不可用
解决方案
sudo apt-get install codeblocks-contrib
- 重启codeblocks