For some reason the code completion in netbeans can't figure out the return type of templated functions. Take the following example...
struct Test
{
int val;
};
int main()
{
vector<Test> v;
Test t = {10};
v.push_back(t);
cout << v[0].val; //Netbeans gives the warning "Unable to resolve identifier val"
return 0;
}
The code compiles and runs fine but what is annoying is that I get this error all over my code when I use vectors. Also the code completion does not seem to work. When I type v[0]. there is no drop down giving me to option to choose val.
I am using netbeans 7.4 along with 64bit MinGW.
Well there seems to bug in the Netbeans 7.2 version and later it was fixed.
https://netbeans.org/bugzilla/show_bug.cgi?id=172227
You can find the complete discussion and possible resolution on the same problem from the following link. Here you can find how to resolve this problem(possibly).
Netbeans 7.2 shows "Unable to resolve identifier" , although build is successful
Follow some simple steps to get your identifiers resolved, given on the following link Netbeans 7.2 shows "Unable to resolve identifier" , although build is successful1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With