0

I'm trying to think of a way to compare a string of multiple words and take each individual word to a dictionary. I have a binary search already coded but it's just breaking the string apart I'm having trouble with.

I have to use C-Style Strings (character arrays).

For instance (pseudocode):

char awesomeString[80];
cin >> awesomeString; user inputs ---> How would I take this string and compare each word into the dictionary;

check "how" and compare to dictionary. FOUND WORD.

check "would" and compare to dictionary. FOUND WORD.

check I...

check take

etc.

Edited by Carc369

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Carc369
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.