Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1.                         for(unsigned int i = 0; i < word.length();)
  2.                         {
  3.                                 if(!isalpha(word[i])) //To read plain text into the vector, with the exception of apostrophe
  4.                                 {
  5.                                         if(word[i] != '\'')
  6.                                         {
  7.                                                 word = word.erase(i, 1);
  8.                                         }
  9.                                 }
  10.                                 else i++;
  11.                         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement