Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TString ClearPoz(TString &s)
- {
- int poz=0;
- int n=0;
- int i,j;
- /*
- cout<<"Clear from : "<<s.GetStr()<<endl<<"Start in pozition : ";
- cin>>poz;
- cout<<"Clear : ";
- cin>>n;
- */
- poz=3;
- n=1;
- TString buff;
- buff.str=new char[strlen(s.str)-1];
- buff.str[0]=(char)strlen(s.str)-n;//buff.str[0]=(char)strlen(s.str)-poz;
- strcpy(buff.str,s.str);//strcpy(buff.str,s.str);
- for(int i = poz , j = poz; i <= buff.str[0]; i++)
- if(i >= poz + n)
- {
- s.str[j] = buff.str[i]; j++;
- }
- s.output();
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement