struct limit{
int up;
int down;
};
void *x;
struct limit *l;
l->up=1;
l->down=20;
x=l;
cout<<x->up;
This is part of my code I am getting error in last line ‘void*’ is not a pointer-to-object type. I know last line in my code is wrong. I just want to know how to print up and down values using x
variable.