an expert question!


[ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by CrAz 2001 on November 21, 2001 at 20:25:03:

Hello everyone.

I have the following problem:

I need to program an application which reads from one or more external documents, named "dok1.txt","dok2.txt" etc. The program shall print out the words which are found in "dok1.txt","dok2.txt" etc. but if it finds words (one or more words) which are the same in all the documents it reads, it shall only refer to that word one time, but tell the user which document(s) they are to be found

Example:

dok1.txt contains the text : hello world! Anybody.

dok2.txt contains the text : Anybody can sing.

dok2.txt contains the text : I can if you can.

The program shall then print out something like this:

hello : dok1
world : dok1
anybody : dok1,dok2
can : dok2,dok3
sing: dok2
i : dok3
if : dok3
you : dok3

Are there anybody out there who can reply with the complete source code on how this could be solved?
I would be severly grateful to any replies!
Yours sincerely
CrAz


Related Articles and Replies


[ DelphiLand FAQ ]