Upon compiling some new code i discovered a disturbing error that troubled me for a bit.
error C2664: 'ResolveCollision' : cannot convert parameter 3 from 'int *' to 'bool *'
The thing is... parameter 3 is declared specifically as type "BOOL Expire". The function definition asks for "bool * Expire". So i pass "&Expire"... Not a problem right? Wrong. After perusing through the help files at first i find nothing:
Of course BOOL is a Win32 type but... Isn't a boolean a pretty universal concept? I mean come on...
Info on Data Types says simply:
BOOL A Boolean value.
Not very useful. Then i find this under "bool"
In Visual C++4.2, the Standard C++ header files contained a typedef that equated bool with int. In Visual C++ 5.0 and later, bool is implemented as a built-in type with a size of 1 byte. That means that for Visual C++ 4.2, a call of sizeof(bool) yields 4, while in Visual C++ 5.0 and later, the same call yields 1. This can cause memory corruption problems if you have defined structure members of type bool in Visual C++ 4.2 and are mixing object files (OBJ) and/or DLLs built with the 4.2 and 5.0 or later compilers.
So whats the reasoning behind this?