I am starting with C and OpenGL and came across the situation where I wanted to have true and false as boolean values, but couldn't get them, since they don't exist as such in C. I then came up with the idea to use the #define to just define them in a utils.h I use in almost all other files anyways, but wanted to check if that is okay with the standards or if there is some reason one shouln't do that. I then came across a site, which made it clear, that this is ok for convenience, but had a little section which left me confused:
To make life easier, C Programmers typically define the terms "true" and "false" to
have values 1 and 0 respectively.
In the old days, this was done using #define:
#define true 1
#define false 0
Today it is better to use const int instead of #define:
const int true = 1;
const int false = 0;
Is that true, and if so, why is that better?
Eventually I just went with stdbool.h, as described there, but the other thing really left me puzzled.