Removing duplicates record from a file

Feb 5, 2009 at 3:45am
hi all

I am writing a file,"abc" but my data has duplicates. Is there anyway to write only the unique record to the file. also I have to read this file in my program if only unique record can not be written , Is there any function to read only the unique record from file.

Please help me

Thanks
Last edited on Feb 11, 2009 at 3:29am
Feb 5, 2009 at 5:44am
How is your data stored before you put it in the file? If your data is stored in some sort of array or list, you can write a function that will eliminate the duplicates from the list first, then write the list to file.
Topic archived. No new replies allowed.