C++ examples for STL:string
Use substr "to-end-of-string" option
#include <iostream> #include <string> using namespace std; int main() // ww w . j av a 2 s. c o m { string s1( "happy test test test test " ); string s2( " birthday test test test test " ); string s3; // cout << "The substring of s1 starting at\n" << "location 15, s1.substr(15), is:\n" << s1.substr( 15 ) << endl; }