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