Append subscript locations 4 through the end of one string to create another string : string append « string « C++ Tutorial






#include <iostream>
#include <string>
using namespace std;

int main()
{
   string s1( "cat" ), s5;

   s5 = "this is a test";
   s5.append( s1, 4, s1.size() );
   
   return 0;
}








15.2.string append
15.2.1.Append two strings
15.2.2.Assign one string to another
15.2.3.string overloaded +=
15.2.4.Append subscript locations 4 through the end of one string to create another string