I'm not going to be able to work on this project for a couple of weeks because I have homework deadlines that I have to complete (this project is something I'm doing for fun).
When I get a chance to continue working on it I'll let you know if my issue is solved...
Thanks so much guys!
I seemed to have gotten it working with what you gave me for the most part other than if the input is "i'm okay" (I still want to run some more test though). Did the algorithm you posted cover the "i'm okay" issue?
I tried using the |= operator that you showed me but it said that I had to define that operator. Did you define it or is it included in a later version (I'm using Visual Studios 2017)?
Yes "I'm" should be counted as one word, the issue is that "I'm ok" appears in the no vector but "Ok" appears in the yes vector. I'm trying to find a way for my function to differentiate between them.
|= appeared in the code posted by seeplus. I didn't understand it and seeplus explained that it's a bit or. When I tried using it though in Visual Studios 2017 it said that the operator was not defined, so I was wondering whether this operator is a new addition?
1 2 3 4 5 6 7
if (f + word.size() >= userInput.size() || std::isspace(userInput[f + std::size(word)]))
{
checkedResult |= typ; //this line
userInput.erase(f, word.size());
f = 0;
}