Advertisement
Holek

Untitled

Jul 2nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. using namespace std;
  5. vector <string> funct(vector <string> kont, vector <string> wz){
  6.     vector <string> zwroc;
  7.     int rozmiarWZ = wz.size();
  8.     int rozmiarKo = kont.size();
  9.     for(int i =0; i<rozmiarKo;i++){
  10.             for(int a =0; a<rozmiarWZ;a++){
  11.                 if(kont[i].find(wz[a]) != string::npos){
  12.  
  13.                 }else{
  14.                     zwroc.push_back(kont[i]);
  15.                 }
  16.             }
  17.  
  18.     }
  19.     return zwroc;
  20.  
  21. }
  22. int main()
  23. {
  24.     vector <string> WyrazyZabronione;
  25.     WyrazyZabronione.push_back("Dupa");
  26.     vector <string> slowa;
  27.     slowa.push_back("asd Dupa asdasd ");
  28.     slowa.push_back("asDupa asdasd ");
  29.     slowa.push_back("asd sdasd ");
  30.     vector <string> z;
  31.     z = funct(slowa,WyrazyZabronione);
  32.  
  33.     cout << z.size()<< endl;
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement