So I just spent the last few hours pouring over code trying to figure out the source of a bug only to find that my error was none other than the obviously wrong but compiler accepted:
if (a = b)
where it should have been
if (a == b)
What do you guys do to safeguard against these frustrating errors? What other common "obviously wrong, but compiler won't complain" bugs should I also watch out for?