If they aren't I know it's possible to make a bool type using define macros. The reason I'm wondering is because I'm thinking about programming with MFC.
If they aren't I know it's possible to make a bool type using define macros. The reason I'm wondering is because I'm thinking about programming with MFC.
There is no bool.h specified in any C standard.
There is a stdbool.h specified in the 1999 C standard, which defines macros bool (which expands to a reserved keyword named _Bool), true (which expands to 1), and false (which expands to 0).
The 1989 C standard specified no such thing. MFC is somewhat older than 1999, so might not interact with the macros in stdbool.h as you expect.
Windows uses it's own bool type called BOOL that has the values TRUE and FALSE.
More accurately, the win32 API employs a type called BOOL (which is a typedef for a simple int, which is 32 bits). It won't take much thought to work out what TRUE and FALSE are defined as.....Originally Posted by OnionKnight