Instead of array, you can use a container which support uniqueness, for example
http://www.cplusplus.com/reference/unordered_map/unordered_map[
^].
In you case, the user name should be used as a key, and all user information as a value (mapped) type
T
.
For big volume of user information, you could use a relational database, and you would have to have a users table where a user name is used as a primary key.
—SA