C++ examples for STL:string
Use overloaded string concatenation operator
#include <iostream> #include <string> using namespace std; int main() /*ww w .j av a 2 s. co m*/ { string s1( "happy" ); string s2( " birthday" ); string s3; cout << "\n\ns1 += s2 yields s1 = "; s1 += s2; // test overloaded concatenation cout << s1; }