1// string::length
2#include <iostream>
3#include <string>
4
5int main ()
6{
7 std::string str ("Test string");
8 std::cout << "The size of str is " << str.length() << " bytes.\n";
9 return 0;
10}
1#include <string>
2#include <iostream>
3
4int main()
5{
6 std::string s(21, '*');
7
8 std::cout << s << std::endl;
9
10 return 0;
11}
12