M
mdh
I understand *why* this produces an error and how to correct it, (add
parentheses) but the error itself is a bit eclectic? As I am sure this
will arise again, could anyone throw some logic at it.
int main (int argc, const char * argv[]) {
struct point {
int x;
int y;
};
struct point *pp;
struct point origin;
pp= &origin;
origin = makepoint(23, 67);
printf("%d, %d\n", (*pp).x, *pp.y); /*error: request for member 'y'
in something not a structure or union*/
}
Thanks in advance
parentheses) but the error itself is a bit eclectic? As I am sure this
will arise again, could anyone throw some logic at it.
int main (int argc, const char * argv[]) {
struct point {
int x;
int y;
};
struct point *pp;
struct point origin;
pp= &origin;
origin = makepoint(23, 67);
printf("%d, %d\n", (*pp).x, *pp.y); /*error: request for member 'y'
in something not a structure or union*/
}
Thanks in advance