Re: Word search program in C
Um why don't you look at string.h's functions for a change? Its got all those find(), strcmp() functions in it which would be exactly what you require.
And as for breaking the input into words, make a temp variable store characters only until a space is encountered and do the operation on that and then in the next iteration clear that temp and loop.
You can also store the file contents temporarily post reading into a Linked-List or a string array.
__________________
Harsh J
www.harshj.com
|