Structure array problem

This is a discussion on Structure array problem within the C++ Programming forums, part of the General Programming Boards category; I made my own structure called person it consists of
Code:
struct person
{
char personName[30];
int amLevel;
int noonLevel;
...

Structure array problem

Now I made an array of this structure called
person patient[25]
This I know limits the number of names I can put into the array to 25, but one name has everything that is in the structure. So when I call the program that has this structure and there is enough data to fill out 15 structures how can I only print out certain names with that name's info? or if there are many occurances of one name? Any help is appreciated. Thanks

So what I'm basically doing is this:

Code:

c:\>program //This calls all the info and displays
c:\>programJohn_Doe //This calls all occurances of that name
c:\>programJohn_Doeam //This calls all John Does and the am level

Then it's simple. Fill in your array, then have a loop that checks argv[1] against the values in patient[25].personName[x]. If it finds a match it outputs it. Also if argc > 2, then it can check the next argument against the appropriate variable, etc.