// string::length #include <iostream> #include <string> int main () { std::string str ("Test string"); std::cout << "The size of str is " << str.length() << " bytes. "; return 0; }