I have the following simplified code.
My question is, within the function, how do I refer to the individual elements of Channel?Code:void TestChannels(int *Chan) { int x; for (x=0; x<9; x++) { Chan[x] = x * 2; // Problem is here } } int main() { int Channel[9]; int x; //Initialization for (x=0; x<9; x++) { Channel[x] = 0; } TestChannels(Channel); for (x=0; x<9; x++) { printf("Channel %d = %d", x, Channel[x]); } }