When I write code like
if (doSomething()) str = SOME_CONSTANT;else doSomethingElse();
I am usually pretty sure that this works. But if the compiler then tells me
error C2181: illegal else without matching if
I really start scratching my head. Especially if it is already late at night and I need some sleep. So I sat there, sleepy, scanning these 4 lines of code for some invalid character I've typed in by accident. Do you see it?
I didn't either. Everything looks correct, right?
I finally got my sleep when I realized some CENSORED CENSORED CENSOREDhead had written this to define 'SOME_CONSTANT':
#define SOME_CONSTANT "sdfs";
But I guess programming would be boring without gems like this.