Created
November 16, 2013 18:51
-
-
Save matheuss/7503818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
#if defined __unix__ | |
#define os 1 | |
#elif defined _WIN32 | |
#define os 2 | |
#elif defined __APPLE__ | |
#define os 3 | |
#endif | |
int main() | |
{ | |
if(os == 1) | |
{ | |
cout << "Unix\n"; | |
} | |
else if(os == 2) | |
{ | |
cout << "Windows\n"; | |
} | |
else if(os == 3) | |
{ | |
cout << "Mac/iOS\n"; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment