Code:
int i = 0;
string word;
vector <string> sentence;

do{cin >> word; 
   sentence.push_back(word);
   i++;
  }while(i < 10);
the idea is to get someone to type in a sentence into the console window. This sentence is then broken down into words for further manipulation. However I'd like a more efficient way to determine how many times the loop should execute itself rather than saying 'while(i <10)'.