I am creating a program kind of like a chat bot. I am here to ask how I would go about searching user input.. say the user asks the bot, "How are you doing?"
I want to to a search for key words that would let me know what is being said how I would properly respond to such a question, so I would search the input for question words, such as what, how, when, where and I would also want to do a search for a question mark, so I know it is a question.. Do you understnd what I am talking about? Please help out if so =)
There's a function called strstr() in <cstring> that searches for a word in a string and gives a pointer to the first occurrance....
Therefore if you wanted to test for the word "dinner"
Does that help?
char mystring = "It's dinner time";
cout << "dinner was present";
that helps a lot. Thank you very much