Quote Originally Posted by ranjithan View Post
you can make use of the operator ! which will return bool. See the code snippet below.
Here is the point I'm making:

There is no such thing as "BOOL" in C++ -- that is a Windows invention, and it isn't portable (note this is a non-Visual C++ forum). A "bool" is C++ and can be used anywhere a compliant C++ compiler exists, whether it's Windows, UNIX, Mac, or any other operating system.

That's why if you're writing C++ code, and not using the Windows API, you use "bool". Just because a popular OS API uses "BOOL" doesn't make it good to use in any C++ program (and you definitely can't use it if you're on Linux).

Regards,

Paul McKenzie