Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. string temp;
  2.  
  3.     p = prop.find_first_of(" ,?!.");// p si q sunt int uri care tin pozitiile separatorilor
  4.  
  5.     temp = prop.substr(0, p);
  6.  
  7.     words.push_back(temp);
  8.  
  9.     while (p < prop.size())
  10.     {  
  11.         q = prop.find_first_of(" ,?!.", p + 1);
  12.  
  13.         temp = prop.substr(p + 1, q - p - 1);
  14.  
  15.         if(q - p > 1)
  16.             words.push_back(temp);
  17.  
  18.         p = q;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement