Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am writing a question/answer C++ program with vectors. The user will enter a q

ID: 3896612 • Letter: I

Question

I am writing a question/answer C++ program with vectors. The user will enter a question and i need to parse the question for keywords. I have a file filled with answers and i need to put it in a vector. I will create a vector with the keywords and keys in it. Keys will refer to the answers in the first vector.

So basically, ask the user a question, parse the question to keywords, look through keywords vector and create percentage of possibility for keys, display the highest possibility.

This is what I have so far.

The program doesn't work at all. I need help making it work.

Explanation / Answer

In method getInput(string &question, int &count, int &answer), the value of count is 0 as in the main() method, the value of count is set to 0 thus count=0 is passed to a function getInput() method and we are not sure why the count is used in this program although the value of count is not used in other functions except in getInput().