Instead of writing code like this
while (getline(cin, inputWord))
{
if (inputWord.empty() || inputWord == " " || inputWord == " " || inputWord == " ")return 0;
}
How can I get the user to terminate the program regardless of how many whitespaces are present?