In my code, I am using an array xyz of 10 objects. When I am trying to access an element of the array using an unsigned int index like this: xyz[level], I get ‘Buffer overrun‘ warning. Logically, I am pretty sure that level won’t exceed 10. How to avoid this warning?
In my code, I am using an array xyz of 10 objects. When I
Share
I’m probably teaching my grandmother to suck eggs here, but do remember that “level won’t exceed 10” is wrong for an array of size 10: