First of all this is C++, not C so you should be using a vector of classes not an array of structs. Here is a link to the STL http://www.sgi.com/tech/stl/ where you can look up everything you need about those. Although I am not sure why you would want to index by name in your case, the way to accomplish that is to use a hash set. Again you can look up all relevant information for that at the above link.