I thought that C interpreted true as 1 but now I'm having doubts.
Full code (compiled with GCC 5.1):
if(true && true) // Error: 'true' undeclared (first use in this function)
{
}
Why does this happen?
I thought that C interpreted true as 1 but now I'm having doubts.
Full code (compiled with GCC 5.1):
if(true && true) // Error: 'true' undeclared (first use in this function)
{
}
Why does this happen?
true is not a keyword in C like it is in C++.
To access it you'll have to #include <stdbool.h>.