How to prevent for-loops from boundary overrun?

Gordon's c/w came up w/ this cunning solution:

for (int i=0;i<max; i++) {
 ...
} while(0);

 

 

 


Looks like you're still reading this content through a Web Browser or RSS. Get with the program!