On Mon, 26 Mar 2007 17:33:23 -0700, wolky wrote:
hi all my friends...
ı have a problem with file processing in c... ı have some questions
about it...
ı have two txt files... in first one there is a text, in second one
there are words that ı want to remove these words from first one... how
can ı remove those words from first one?
Read the first file, producing an ordered binary tree of structs that
associate each word with its ordinal and any following punctuation.
Note that you must allow for duplicates words in the first file.
Create an ordered binary tree of the words in the second file. Whether
you allow for duplicate words in the second file is between you and
the specification.
Traverse both trees in word order, dropping all members of the first
tree that match words in the second tree.
Create an array of pointers to the remaining entries in the first tree.
Use qsort() to sort them by ordinal number.
Emit the words in the order they appear in the list, each followed by
the associated punctuation. Dealing with orphaned punctuation and
post-punctuation capitalization is left as an exercise for the reader.
thx all for ur help
Even the mesopotamians can't help you now.
Martin
--
Martin Golding | He who steals my code steals trash.
DoD #0236 | (Twas mine, tis his, and will be slave to thousands.)
A poor old decrepit Pick programmer. Sympathize at:
fo*****@comcast.net Vancouver, WA