I'm testing something that we do in school. I have a struct MyStruct and two pointers, but when I want to work with the pointer I get this error for both pointers:
uninitialized local variable 'p' used
struct MyStruct {
int id;
double value;
};
MyStruct *p, *q;
double z = 10;
double y = 16.17;
(*p).value = z;
(*q).value = y;
cout << (*p).value << " " << (*q).value << endl;