Question
C++ searching a vector for commonly used words I need help with my code for a function which is supposed to look at a file
C++ searching a vector for commonly used words
I need help with my code for a function which is supposed to look at a file of the most used english words and search for those words in another .txt file. This is what I have so far:
bool isStopWord(string word, vector
for(int i = 0; i < _vecIgnoreWords.size() ; i++){
if(_vecIgnoreWords[i] == word)
return true;
else
return false;
}
return 0;
}
For example: "the dog went to the park" the should be identified as a Stop Word
We aren't allowed to use
Here is the .txt file of words:
the be to of and a in that have i it for not on with he as you do at this but his by from they we say her she or an will my one all would there their what so up out if about who get which go me
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started