I am teaching myself C++ and I an having difficulty in matching a single word to selection of words in a list. Can anyone help me with a little source code or an algorithm?
Thanks
Mary
Printable View
I am teaching myself C++ and I an having difficulty in matching a single word to selection of words in a list. Can anyone help me with a little source code or an algorithm?
Thanks
Mary
Can you post what you have so far?
Dave
selection or collection of words????
Do Linear search , u can do also Binary search
Linear Search is searching from first item to last item{till the word found}in the list , use strcmp() function to compare , and search ur word with all the items in the list , if match is found just go out of the loop and till the end of the loop if no match is found then declare it is not found
all the best
Asha