Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans hating nullptr but still working fine

I've seen similar posts around about this but can't get Netbeans to just stop showing the error message "Unable to resolve identifier nullptr" all over my code when it's working fine. I have C++11 enabled properly, not sure what the problem is?

like image 624
Instinct Avatar asked Mar 04 '14 22:03

Instinct


2 Answers

For Netbeans 7.4

In Project Properties:

Set "C Standard" to "C11" for the editor and "Additional Options" add "-std=c++0x" for the compiler

In my case, I had to close and reload the files and the error mark disappears.

Edit:

This is not a 100% working Solution, sorry.

like image 198
testo Avatar answered Nov 10 '22 12:11

testo


I remember that there was a bug report filed in 2012 about this issue to the Netbeans developers (it should be solved right now).

Anyways try to set the GCC flag for the C++11 support to: -std=c++11, which can be done in Project Properties -> Build -> C++ Compiler -> Additional Options, unless that's what you have already done, then I got nothing.

like image 27
imkort Avatar answered Nov 10 '22 11:11

imkort