how to use sizeof string function in c++ code example
Example: c++ string size
// string::size
#include <iostream>
#include <string>
int main ()
{
std::string str ("Test string");
std::cout << "The size of str is " << str.size() << " bytes.\n";
return 0;
}