Some people prefer using 'for (;;)', instead of 'while (1)', to write a loop that loops forever. Why?
Code:for (;;) { DOSTUFF; if (...) exit(0); }Why is for(;;) better?Code:while (1) { DOSTUFF; if (...) exit(0); }
Some people prefer using 'for (;;)', instead of 'while (1)', to write a loop that loops forever. Why?
Code:for (;;) { DOSTUFF; if (...) exit(0); }Why is for(;;) better?Code:while (1) { DOSTUFF; if (...) exit(0); }
Last edited by Hammer; 07-13-2005 at 04:22 PM. Reason: Disabled smilies to make it more readable [Hammer]