So I want to put all of these methods (not sure if that is the right term) in to an array so I can access them in a FOR loop. Here is what I have tried... Any help would be appreciated.
WiiChuck chuck = WiiChuck();
WiiChuck (I've tried chuck here as well) command[6] = chuck.readRoll(), chuck.readPitch(), chuck.readAccelX(), chuck.readAccelY(), chuck.readAccelZ();
for(int i = 0; i < 6; i++){
if(command[i] < 10){
do something
}
}
I don't know C++ so can't comment on that bit, but in C you could have an array of function pointers, and consequently call each function as you iterate through the array.