Skip to content

Instantly share code, notes, and snippets.

@matheuss
Created November 16, 2013 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matheuss/7503818 to your computer and use it in GitHub Desktop.
Save matheuss/7503818 to your computer and use it in GitHub Desktop.
#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