How can i make a "letter could not be found" break?
I've made a small vector, that holds single characters, and i've made a small function that iterates through the vector to find a letter the user inputs. It works fine if the letter is in the vector, but how could i make it say "letter could not be found" or something similar? here's my function if it's any use:
char search(vector<char> line, char letter)
iter = line.begin();
while (*iter != letter)
if (*iter == letter)
temp = *iter;