Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TString s1_input_s2( TString &s1, TString &s2)
- {
- TString buff;
- int sz = strlen(s1.str) + strlen(s2.str)-2;
- buff = new char[sz + 1];
- buff.str[0]=sz;
- int poz=2;
- int i=0;
- int j=0;
- for( i = 1,j=0; i <poz,j<strlen(s1.str); i++,j++)
- {buff.str[i] = s1.str[i];buff.output();}
- for(i=poz,j=1;i<=strlen(s2.str),j<=strlen(s2.str);i++,j++)
- {buff.str[i] = s2.str[j];buff.output();}
- for(i=strlen(s2.str)+poz,j=poz+1;i<strlen(s1.str),j<strlen(s1.str)+poz;i++,j++)
- {buff.str[i]=s1.str[j];buff.output();}
- return buff;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement