You really should be doing the sort and the duplicate check at the same time as you read the data in, which will be much more efficient, and also way less code.
Since both the sort and the duplicate check are based on the name which is the first word in each string, you don't need a struct as Adak claims, but you only need one array.