I'm using an array to store some values that will be used in a sketch. This declaration is near the top of the sketch:
int outputs[OutputCount][3] = {{ 5, 10, 13}, // Output A
{ 15, 20, 12}, // Output B
{ 2, 12, 11}, // Output C
{ 10, 2, 10}}; // Output D
Later in the sketch in one of the functions I want to use one of the values:
void foo(){
int i = *outputs[bar, baz];
}
The compiler wants me to include the asterisk:
error: invalid conversion from 'int*' to 'int'
However, if I reference the data thusly:
void foo(){
int i = outputs[bar][baz];
}
the asterisk is not required.
Why is this?