Hi,
I have this piece of code, and was hoping someone would so kind as to explain to me in English what each part 'does'.
Code:
struct Patient
{
int id;
double weight;
double height;
bool ismale;
};
// new function declaration
void WeightLoss(Patient *countWeight);
It's the part in bold I'm wondering about.
I understand that *countweight is both declaring the pointer 'countWeight' and that it is the argument of the function.
I'm just a little confused on Patient 's role, is it that by including Patient before *countWeight - it means that the pointer *countWeight will point to an element within the struct Patient? Or is it performing some other role?
Many thanks!