const char reset = '3';
char savedArray[32] = "0000000000000000000000000000000";
savedArray[reset] = '1';
Serial.println(savedArray[reset]);
Serial.println(savedArray[3]);
Serial.println(savedArray);
So I am changing the value of the savedArray at position 3, but when I read it out again I find it 0.. What am I doing wrong? Why isn't reset the same as 3?
Serial output:
1
0
0000000000000000000000000000000
char resetand notint reset?size_t reset, if we wanted to nitpick.charandintwill work (because3fits),size_twould be the choice for generic indexing.