Netbeans " Impossible to permit identification "
-
Netbeans 8.0.2 (as well as 8.1) is constantly " fighting " with the phrase " Identifier cannot be allowed " . How do you fix it?
The code is compiled without error (the example is given, not the real code). The file is created directly in the IDE in the UTF-8 code. Code Assistance (coding assistant) is included. The re-examination of the project (Reparse project) is not helpful.
#include <iostream> #include <string> #include <map> #include <vector>
typedef struct
{
int a;
int b;
char c;
} S;
std::map<int, S> m;
std::vector<int> v;int main()
{
for(auto &x : m)
x.second.a = 1;return 0;
}
-
Make sure you have the right compilators in NetBeans, first of all, make sure they have a C+11 standard, if you use it.
- Tools - Sector Options - constituent C/C+++. In the first deposit (Build Tools), an existing collection tool (i.e. compilers) may be added or edited
- Project Properties - constitutional Build. Indicate the added/built collection tool
- Project Properties - constitutional Build - Category C++++ Compiler - Category C++ Standard. Indicate C++11