std::string Test = "hello there everyone";
cout << Test.size() << endl;
std::string Test = "hello there everyone";
cout << Test.length() << endl;
std::string Test = "hello there everyone";
cout << Test.size() << endl;
std::string Test = "hello there everyone";
cout << Test.length() << endl;
Quote:Original post by deadstar
I think you're missing the point - there are 20 characters in that string, both functions return 14.
Quote:Original post by asp_
Maybe std::cout has been set to hex mode previously?
std::string Test = "hello there everyone";std::cout << std::dec << Test.size() << std::endl;