typedef struct
{
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char a;
} RGBA;
And I want to pass in the address of each element (r, g, b, a) to some function. The function receives the address and stores it into a pointer. The function uses the pointer to store info in r, g, b and a.
When I pass the address to the function, how do I express it?
Is this the correct way to do it:
&(rgba.r)Or should it be:
&(rgba).rOr neither? Thanks.