Click to See Complete Forum and Search --> : Word Matching


Mary Parsonage
March 30th, 1999, 05:07 AM
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

Dave Lorde
March 30th, 1999, 05:11 AM
Can you post what you have so far?


Dave

Ammu
March 30th, 1999, 05:14 AM
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