jbellavance:
Maybe I should investigate that C++ garantees that int arrays are zeroed on creation.
Variables defined on the stack are most emphatically not initialized. Variables in global space … IIRC, C doesn't insist they be zeroed - it's not a formal part of the language, but the arduino linker and whatnot will zero them.
Variables in global space … IIRC, C doesn't insist they be zeroed
It absolutely does guarantee statics and externs will be initialised to zero (unless otherwise initialised), at least since edition two of K&R (Peace be unto them)
AWOL:
It absolutely does guarantee statics and externs will be initialised to zero (unless otherwise initialised), at least since edition two of K&R (Peace be unto them)
Ah. There's the problem: I learned C off edition 1, back in '85.