I have been at this for some time now, and this won't compile:
Code:
(function(int data))
void * MyPointer
if (data=0)
{
Gyro gy(1);
MyPointer = &gy;
}
if (data=1)
{
Ultrasonic gy(1);
MyPointer = &gy;
}
if (etc...
etc...
(function2(int data2))
if (data2=0)
return MyPointer->GetValue(); //this produces error: 'void*' is not a pointer-to-object type (:eek:)
etc...
You can probably see what i am doing, (accessing different function based on sensor type), and Nothing has worked
