int sum = 3;
int i = 0;
myCode[] = {};
void loop () {
myCode[i] = sum;
}
In this example the variable 'i' gets the value of '3' instead of assigning the value of '3' to the array myCode[] with the index '0' (i).
I honestly don't know why it does this. This is only a small part of the program. I don't include the full program because that would only be confusing for you guys and this is the only part of the program that is not working.
How would I use the value of i to assign a value to the array with i as index??