Advertisement
nastiia_firefly

Untitled

Nov 18th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. TString ClearPoz(TString &s)//---------------------------?
  2. {
  3.  
  4.     TString buff;
  5.  
  6.     buff.str=new char[strlen(s.str)+1];
  7.     buff.str[0]=(char)strlen(s.str)-1;
  8.  
  9.     strcpy(buff.str,s.str);
  10.     delete[]s.str;
  11.  
  12.     int poz=2;
  13.     int n=2;
  14.  
  15.     for(int i=1;i<poz;i++)
  16.     {
  17.         s.str[i]=buff.str[i];
  18.       //  cout<<s.str[i];
  19.     }
  20.  
  21.     for(int i=poz;i<=buff.str[0]-n;i++)
  22.     {
  23.         s.str[i]=buff.str[i+n];
  24.         //cout<<s.str[i];
  25.     }
  26.  
  27.  
  28. return s;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement