How should I get the number of characters in a string in C++? ... If you're using a std::string, call length(): std::string str = "hello"; std::cout
stackoverflow.com