In C++, the condition for if, while, for is evaluated to "false" if it's 0 (zero) and evaluated to "true" otherwise.
A code like
1 2 3
|
if (1){
// some code
}
|
will always execute the if code block because 1 evaluates to true.
This can be useful because
1 2 3 4
|
int n = 1;
if (n){
// some code
}
|
has the same effect.
Lower case true (not TRUE, that's something else) and false are boolean literals. The false literal has like no choice but to evaluate to 0 (as a number) since that's C standard. On the other hand the true literal can evaluate to any non-zero number, however it usually evaluates to 1.
In other words, if you do
int n = true;
n will most likely be 1 and if you do
int n = false;
n will be be most likely 0.
If a variable is wanted to take only two values (true or false) it is best to use the bool data type since it's specially designed for that and it makes the code more readable.
More about C++ types: http://www.cplusplus.com/doc/tutorial/variables/