Code::Blocks 12.11 error: ‘nullptr’ was not declared in this scope&GNU GCC -std=gnu++0x
Aleeee’s blog
C + + primer English Version (Fifth Edition) P54 null points chapter: Modern C + + programs should generally use null and use nullptr instead. So we use code:: blocks to type the code, and the problem comes.
error: ‘nullptr’ was not declared in this scope
So Google answers on the Internet, a lot of English, and finally probably understand that it’s the GNU gcc compiler problem, not the IDE problem of code:: blocks. You just need to type the command line – STD = GNU + + 0x in the compiler. Solution: Code:: blocks integrates GNU gcc compiler, so menu bar – & gt; setting – & gt; compiler , select the global compiler settings page, select GNU gcc compiler at the top of the page, select compiler settings – & gt; compiler flags at the middle of the page, and check have G + + follow the coming C + + 0x ISO C + + language standard [- STD = GNU + + 0x]
Well, the next compilation will be successful! O(∩_ ∩)O~
Read More:
- Code:: blocks prompt nullptr’s was not declared in this scope
- g++ error: ‘printf’ was not declared in this scope
- error: ‘NULL’ was not declared in this scope
- error: `cout’ was not declared in this scope
- error: ‘exit’ was not declared in this scope
- error: ‘atoi’ was not declared in this scope
- error: ‘memcpy’ was not declared in this scope
- c++ error: ‘malloc’ was not declared in this scope
- error: ‘CV_BGR2GRAY’ was not declared in this scope
- g++ c++ error: ‘malloc’ was not declared in this scope
- Error:‘itoa’ was not declared in this scope
- error: ‘vector‘ was not declared in this scope|
- error: ‘stoi’ was not declared in this scope linux (Fixed)
- Arduino ide 1.6.9 problems encountered error:’TKD2′ was not declared in this scope
- Analysis of the causes of errors in G + + compilation “was not declared in this scope”“
- [Error] ‘sort’ was not declared in this scope
- Alpine Linux executable file crash report error / lib / x86 not found_ 64 Linux GNU / libc.so solution
- Arduino reports an error when writing a custom library file to solve the problem of not name of type, not declared in this scope
- “Error: ` cout ‘was not declared in this scope”
- ERROR: The environment variable VG_GNU_PACKAGE must be set. Aborting.