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