C++ examples for STL:string
Display the maximum string length.
#include <iostream> #include <string> using namespace std; int main()//from ww w . j av a2s . co m { string str1("Alpha"); string str2("Beta"); string str3("Gamma"); string str4; cout << "The maximum string length is: " << str1.max_size() << "\n\n"; return 0; }