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=2;
- int n=2;
- for(int i=1;i<poz;i++)
- {
- s.str[i]=buff.str[i];
- // cout<<s.str[i];
- }
- for(int i=poz;i<=buff.str[0]-n;i++)
- {
- s.str[i]=buff.str[i+n];
- //cout<<s.str[i];
- }
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement