Hi
I have a function A ( xy * abc) that takes a pointer to a structure.
typedef struct
{
int a;
char * b;
} xy;
typedef struct
{
xy c;
xy d;
} uv;
uv *sha;
If i need to call the function A for c and d using uv how should I pass the argument? I am calling function A by using this:
A (&sha->c);
A (&sha->d);
Is this call correct?
Kindly help me
If
uvis a struct, and not a pointer to struct, you need to doA(&uv.c), but in your case,uvis a struct type, not an actual struct, you need to have a variable of type uv: