I need to open a word list file, read it into a vector, then search the vector to see if a given word is in the file. I have most, but am having trouble with searching the vector, namely the Search function in the code below:
Just go through your code as it would be executed. First time into loop, i=0, so you compare words[0] with word, and if it matches you return true, and if doesn't match, you return false; end of function. Is that correct behavior?
That's what I have (last function) but it will only return true if the word being searched is the first word. If the word is later in the file(vector) it will return false. I don't know how to start somewhere other than postition zero after words[0] returns false.