Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting non-unique words

Status
Not open for further replies.

bob323

MIS
Jan 3, 2001
5
0
0
US
I have two dimesional char array [1000][30] that contains 1000 words 20 characters long. I want to go through and delete any of the 1000 words that is not unique- ie. those that are repeated. I don't have any idea how to code this can anyone help me?
 
Bob,

This is just 'one' technique that would work. Sort the array using qsort() then build a new array from the sorted one but ignore duplicate items when adding them to the new array.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top