Clion编译出错:nullptr not declared in the scope

问题:用clion编译C++程序,出现错误:nullptr not declared in the scope

错误查找:

1.检查CMakeLists是否是CMAKE_CXX_STANDARD 11

发现是这样设置的,没有问题

2.在Clion的settings中查看MinGW的版本,发现版本过低,所以不支持C++ 11的新特性

解决:

重新下载高版本的MinGW,在setting->Build,Execution,Deployment->Toolchains中重新选择高版本的MinGW


重新编译,错误解决

猜你喜欢

转载自blog.csdn.net/hust_hqq/article/details/80217180
今日推荐