Difference between using true and TRUE

Started by
8 comments, last by Rydinare 15 years, 10 months ago
Using a BOOL (and therefore TRUE, FALSE), VARIANT_BOOL (and therefore, VARIANT_TRUE, VARIANT_FALSE) or any version of a numeric for boolean values in C++ should be a crime. The only exception is when you must because you're interfacing with some of the outdated and nasty Win32 APIs where you don't have much of a choice. In those cases, I tend the wrap the Win32 nastiness behind something that isn't quite so ugly and evil. Use bool and get type-safety.

This topic is closed to new replies.

Advertisement