Erroneous "Unable to resolve identifier" in Netbeans
My program compiles fine, but Netbeans tells me "Unable to resolve id to_string".
I've tried everything in Netbeans 7.2 it shows "Unable to resolve identifier" although build succeeded "and I set" C ++ standard "to" C + +11 "in the code help options.
This is the only function that gives this problem so far. It is, however, also the first C ++ 11 feature I use, which leads me to believe that it has something to do with Netbeans without realizing that I am using C ++ 11, although I clearly state it in the support menu code.
Minimal example:
#include <string>
int main() {
std::to_string(1);
}
EDIT: The same problem occurs when using nullptr
EDIT2: I suddenly realized that it might be important to mention that I am not using the generated Makefile, but SCons.
source to share
I know this question is seven months old, but since it came up as a second google search result, I'll share the answer I came up with. For Netbeans at least. Go to your project properties and make sure you have "C Compiler" -> "C Standard" installed to C11 and your "C ++ compiler" -> "C ++ Standard" installed to C ++ 11. You must install BOTH or it will still give false errors!
source to share
Autocomplete and sometimes even syntax highlighting always fail in C ++. The more you dig deeper with C ++ and C ++ 11, the more Eclipse and Netbeans will start to underline everything with a red squiggly line. Some of my (correct and perfectly compiled) programs are a huge red squiggly line. I suggest you turn off error markers completely and you keep the autocomplete, but in many cases it just won't work and you should do your best.
source to share