I need my code to do different things based on the operating system on which it gets compiled. I\'m looking for something like this:
#ifdef OSisWindows // do
Some compilers will generate #defines that can help you with this. Read the compiler documentation to determine what they are. MSVC defines one that's __WIN32__, GCC has some you can see with touch foo.h; gcc -dM foo.h
__WIN32__
touch foo.h; gcc -dM foo.h