I'm doing a very basic usage of std::string in c++ in Eclipse, and can't figure out why it's not working.
The sample code:
std::string str = "hello";
cout << str << ":" str.length();
The code is not compiling with the following error: Method 'length' could not be resolved
Why?