в си никогда не было bool типа (в с99 добавлены только макросы)
C |
1
2
3
4
5
6
7
8
| if(expression)
{
// statement(s) will execute if the expression is not equal to zero
}
else
{
// statement(s) will execute if the expression is equal to zero
} |
|
в плюсах ненулевые значения кастуются к true, нулевые - к false