koopa
asked on
Deleting duplicates from an array
Lets say you have read 30 names from a file into an array with a format like names: array[1..40] of string[30]; and there are a number of of duplicates in the file and therefor also the array-as you have read the names into the array- please could you write a procedrue which goes through the array and removes all duplicates from the array.
Thanks
Thanks
ASKER
Please could you reply to the question as soon as possible as I am writing exams on this work in about two weeks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Additional note: in the example I gave you, it might be hard to read because of the font that experts-exchange uses in its answers.
In the line that looks like this:
if s[i] = s[j] then s[j] := '';
it is important to point out that these are two APOSTROPHES with NO space in between them, *NOT* a quotation mark. The same goes for the line that is 3 lines below it. Hopefully you weren't confused by this.
In the line that looks like this:
if s[i] = s[j] then s[j] := '';
it is important to point out that these are two APOSTROPHES with NO space in between them, *NOT* a quotation mark. The same goes for the line that is 3 lines below it. Hopefully you weren't confused by this.
ASKER
Thank you for the brilliant answer it helped me alot !
ASKER