I was wondering what is the best way of going about executing code that is dependent on the current run time platform?
The one way off the top of my head I can think of is something like this:
int main()
{
//#define IOS
#define WINDOWS
//#define ANDROID
#ifdef IOS
DoIOSCode();
#elseifdef WINDOWS
DoWindowsCode();
#elseifdef ANDROID
DoAndroidCode();
return 1;
}
But I don't think #defines are globally recognized right?