In c++ when a relational expression is false, it has the value 0. Every evaluated expression produces a result, and it can be either true or false. If you see that your value is zero, it means that you have to look through the expression again and find mistakes.