if we put semicolons at the end of the if statement, it behaves wierdly.
if (axe_y > 450 || axe_y < 0);
this projects wierd
if (axe_y > 450 || axe_y < 0)
this one behaves normal
if we put semicolons at the end of the if statement, it behaves wierdly.
if (axe_y > 450 || axe_y < 0);
this projects wierd
if (axe_y > 450 || axe_y < 0)
this one behaves normal
The semiclolon is just an empty statement which wuold be the same as:
if(condition){}
The semicolon signals the end of the statement so this is exactly what it should do…
Yup, and since if-statements are supposed to have some code immediately after them the compiler complains.