Hi!
I would like to use my vector in a function but the function caller shows that there is a problem. I don´t really know how I can fix this. Thanks for any idea.
Declaration of struct and vector:
Functionsprototyp:
Functionsdefinition:
Function caller:
I would like to use my vector in a function but the function caller shows that there is a problem. I don´t really know how I can fix this. Thanks for any idea.
Declaration of struct and vector:
struct Person
{
string sign;
string firstName;
string lastName;
double height;
};
vector<Person> persons;
Functionsprototyp:
void getName(Person[]);
Functionsdefinition:
void getName(Person persons[])
{
...
}
Function caller:
getName(persons);