Hello,
In my little experiment i am trying to get the compiler to recognize 1 word with 2 parts from a list of names.
for example: if the user wanted to choose "candy bar", from a list of items which include: "candy bar", "cat", "dog"
my current code can recognize words without a space like cat and dog. But how can i recognize candy bar?
I tried using getline but its of no use.
Any help is appretiated. Thanks.
E: Just thought about it again. So you have a library of words and you are trying to get as many matches to any input the user enters. So say the user enters:
rain, bow
And your library contains the words:
string lib [] = {"cat", "dog", "rainbow", "rain", "bow"};, it should match rain, bow, and rainbow