precompile directive?

hey everyone. havent posted here in a longgggg time. hope to see some familiar faces!

heres my question, ive been doing basic programming in c++ again and want to use getch(). in *nix i have to use the curses library, and in windows conio.h

is there a way i can have the compiler determine what OS i am running?

so, if i am under some kind of linux itll use #include <curses> and if under windows itll use #include <conio.h>

thanks!

#ifndef WINDOWS
#include <curses.h>
#else
#include <conio.h>
#endif

The symbol LINUX is usually defined for most Linux distros, so you can test for that if you want.

just what i was expecting. thanks a lot.