How to tell if you're compiling on Windows?

c++, windows

Solution

The _WIN32 is always defined on Windows platform, checkout the predefined macros.

Problem

Something like: ``` #ifdef WINDOWS // do stuff #endif ```

Original source