i use a void pointer to point either one of two distinct class types.
say:
class x{...}
class y{...}
and
void *p;
x object1;
y object2;
p = (x *)&object1;
etc....
and somehow when i need to reach to one of object1's fields:
i want to use p to reach the object but
i receive
"attempt to dereference a generic pointer" error?
is there anybody who has faced this error before?
thanks in advance