CodeBlocks 13.12默认使用的C++版本是什么?适配C++ Primer代码场景
Hey there! Let's break this down clearly since you're working through C++ Primer and dealing with C++11-specific code.
First, keep in mind that Code::Blocks is just an IDE—it depends entirely on the underlying compiler for C++ standard support. The 13.12 release (from 2013) typically ships with GCC 4.8.x as its default compiler.
Here's the key detail: GCC 4.8.x defaults to the C98 (C03) standard out of the box. Even though GCC 4.8 already has solid support for most C++11 features, it won't enable them automatically.
So if you're running code from C++ Primer that requires C11 (like range-based for loops, smart pointers, or lambda expressions), you'll still need to manually set the compiler flag to -std=c++11 (or -std=gnu++11 if you want GNU extensions alongside C11) just like you already know how to do.
内容的提问来源于stack exchange,提问作者Jake Wright

