<<< User-defined types | Index | Adding functions to classes >>> |
#include <iostream> #include <string> using std::string; int main() { string s1 = "This is a string"; std::cout << "There are " << s1.length() << " chars in " << s1 << std::endl ; return 0; }
<<< User-defined types | Index | Adding functions to classes >>> |