How to piss off a customer.
int i; for (i=0; i < theList.size(); i++); { theList[i].something = 0; }
= crash.
Since I couldn't run the code (couldn't come up with data that would ever cause that code to run), it took me a day to figure out what the problem was. Any of you C/C++/etc peeps see the problem?
Fucking semicolons.
the solution to and the cause of all life’s problems…
i’m a little surprised that none of the compilers or static code analysis tools we use here even bothered with a warning. i know it’s perfectly legal, but it’s unusual, and the presence of braces immediately following the ‘for’ should be a hint that i didn’t intend to do a bodiless loop.
ooh — that’s an unfortunately placed bit of punctiation, yes.