I have four arrays:
int a1 [3] = { 10, 20, 30 };
int a2 [3] = { 10, 20, 30 };
int a3 [3] = { 10, 20, 30 };
int a4 [3] = { 10, 20, 30 };
I want to call array depending on a global variable:
int sys=1;
lets say:
int a1+sys; // this should gives array a2
int a1+2*sys; // this should gives array a3
How can I achieve this ?
int a[4][3] = { { 10, 20, 30 }, { 10, 20, 30 }, ...};Now you can writea[sys].int a[4][3] = { {10,20,23}, {....and thena[sys][x]??