I have tried many things as far as syntax goes.
Code: Select all
void optimize(unsigned char parameter[2][12][12] );
//for the sake of this, lets assume that all these arrays are declared and initialized.
int main()
{
unsigned char *large_tables[9]={&spark_table, &fuel_start_table, &fuel_duration_table, &water_start_table,
&water_duration_table, &intake_phasing_table, &intake_duration_table,
&exhaust_phasing_table, &exhaust_duration_table};
optimize(*large_tables[subsystem]);
}
void optimize(unsigned char parameter[2][12][12] )
{
// do stuff
}
Code: Select all
warning: array subscript has type 'char'
error: call of overloaded 'optimize(unsigned char&)' is ambiguous
Code: Select all
cannot convert char (*)[2][12][12] to 'char' in initialization
invalid conversion from 'char' to char (*)[2][12][12]'
Thanks,
Chris