#include<iostream>
#include<conio.h>
#include<string>
using namespace std;
int main()
{
string str1="he is a good boy ";
string str2="and he is honest person.";
cout << "With out Inserting data in string ONE..:"<< endl << endl << str1 << endl;
cout << "Total size of string ONE.."<< str1.size()<< endl<< endl;
str1.insert(17,str2); // insert string2 in string1 after 17 position
cout << "After Inserting data in string ONE..:"<<endl;
cout << "................................................:"<< endl ;
cout << str1 << endl;
getch();
}
#include<conio.h>
#include<string>
using namespace std;
int main()
{
string str1="he is a good boy ";
string str2="and he is honest person.";
cout << "With out Inserting data in string ONE..:"<< endl << endl << str1 << endl;
cout << "Total size of string ONE.."<< str1.size()<< endl<< endl;
str1.insert(17,str2); // insert string2 in string1 after 17 position
cout << "After Inserting data in string ONE..:"<<endl;
cout << "................................................:"<< endl ;
cout << str1 << endl;
getch();
}