My question is how do you pass a struct.variable (or the struct array) to the void function. Basically the code looks as follows:
Structs
struct Person{
    string surname;
    string BType;
    string organ;
    int age;
    int year, ID, IDp;
} Patient[50], Donor[50];
int i; // counter variables for the arrays such as Patient[i].BType... etc
int i1; 
Then the code for the function is a line like this:
void compare(int &i, int &i1, Person &Patient[50], Person &Donor[50]);
I tried to pass the i, i1, Patient and Donor structs. Why won't this work? Is there a special way to pass these sorts of structs to a function? 
The values into the variable structs also are read from a file (don't think that changes anything here). Any ideas?
 
     
     
    