hey guys... here's my question
i have to read a text file and find some key words in it .... i know i cannot have a set of strings, and i know everytime i find a word i can check the word with a linklist or an array of strings.......... but this stratigy would take a lot of time and would be insufficient.
can anybody suggest anything else?

Recommended Answers

All 2 Replies

Actually, you can't get around having a list of the words to find. Both an array of string and a linked list of strings are just as efficient.

Unless you have to find more than 100 words or so on a large text, there is no point in trying to make a more efficient (and much more complicated) algorithm.

Hope this helps.

Hello N_Mehdi
how meny key words do you have that you want to find them in the text file

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.