First mistakes to recognize
Declaring inside a block
main {
int value; // invalid: runtime variables must be top-level
}Confusing assignment and comparison
if(mode = 2) { } // assigns 2; the condition is then true
if(mode == 2) { } // compares; usually what was intendedUsing the wrong letter case
Assuming a function changes its caller's variable
Writing forever in an inner loop
Last updated

