As a CS student at CMU, I've always been told that
Code:
if(isSomeCondition == true) { ... }
is horrible style, and this really should be written as
Code:
if(isSomeCondition) { ... }
Code:
if(isSomeCondition = true)
Is "correct" syntax and by itself will not cause a run time error. However this will cause your program to behave incorrectly (for instance the if statement will always evaluate to true) which could definitely lead to a run time error if e.g.
Code:
if(somePtr = NULL) { ... }
else {
somePtr->someField = someValue;
}
I assume this is what you meant apalrd?