cplusplus.com
C++ : Forum : Beginners : Removing duplicates record from a file
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


question Removing duplicates record from a file

diva (4)
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
mahlerfive (119)
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.