Advertisement
dllbridge

Untitled

Nov 9th, 2022
822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.83 KB | None | 0 0
  1.  
  2. #include   <dllBridge.h>
  3. #include      <iostream>
  4. using namespace std;
  5.  
  6.  
  7.  
  8. string   //s = "WUBWUBABCWUB",
  9.          s = "WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB",
  10.          s2       ,
  11.          s3       ,
  12.         _s = "WUB";
  13.        
  14. int   pos;
  15.  
  16. int foo();      
  17.  
  18. ////////////////////////////////////////////////////
  19. int main()                                        //
  20. {
  21.  
  22.    
  23.     cout << "s = " << s << endl;
  24.    
  25.     while(foo() != -1)
  26.     {
  27.        
  28.       s[pos  ] = ' ';  
  29.       s[pos+1] = ' ';
  30.       s[pos+2] = ' ';    
  31.      
  32.       cout << "s = " << s << endl;
  33.     }
  34.  
  35.     system("pause");
  36. }
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. /////////////////////////////////////////////////////////////////
  47. int foo()                                                      //  
  48. {
  49.    
  50.     pos = s.find("WUB");
  51.    
  52.     cout << "pos = " << pos << endl;
  53.    
  54. return pos;
  55. }
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement