//In a header accessible from everywhere:
#ifdef _WIN32
#define WINDOWS
#else
//Don't #define WINDOWS
#endif
//Elsewhere:
#ifdef WINDOWS
//_WIN32 is definitely #defined.
#else
//_WIN32 is definitely not #defined.
#endif
The preprocessor will let you do #define WINDOWS #ifdef _WIN32 , but this will not have the effect you want. The preprocessor performs only a single pass through the code, so you'll be left with an unprocessed #ifdef in your code, that the compiler will complain about.
If you don't want to mess with macros, another alternative is to compartmentalize the implementations for each platform. For example,
Why do you want to do that? This forum is here as a learning resource, for anyone who reads it. If you delete your threads, other people can't learn from them.
The only good reason to remove a thread is if you've made duplicate threads for the same question.
EDIT: And I see you've deleted your original questions from your posts. Please DON'T do that. It makes the thread useless as a learning resource for others.
I will never understand that. It's not like this was even a school assignment. This website isn't running out of space, you need not be concerned with that...