I am trying to initialize an array of Constants for an embedded computer. It's a lookup table for a non-linear function. I can't seem to get it to compile correctly. Here is the simplified Syntax:
This is how it's used:Code:const int junk [3][2] = {10, 2. 5, 4, 1, 6};
I actually extrapolate between the elements to determine the value of trsh2, but I didn't do it here for simplification.Code:int trsh; int trsh2; trsh = 3; //This value is input from an A/D conveter. if (trsh == junk[0][0]) (trsh2 = junk[0][1]; else if (trsh >= junk[1][0]) (trsh2 = junk[1][1]; else trsh2 = junk[2][1];


