Example of my a portion of main function
#define ABC #ifdef _WIN32_ #undef ABC #endif #ifdef _WINDOWS_ #ifdef ABC #undef ABC #endif #endif #ifdef WINDOWS #ifdef ABC #undef ABC #endif #endif #ifdef ABC std::cout<<"You are using an unfamiliar OS. . ."<<std::endl; #endif return 0;
If I know how to have an or command in my #ifdefs, then my code can be simplified to this:
#define ABC #ifdef _WIN32_ or WIN32 or _WINDOWS_ or WINDOWS #undef ABC #endif #ifdef ABC std::cout<<"You are using an unfamiliar OS. . ."<<std::endl; #endif
Thanks for reading
Oh wait. . . I just realized.
This could be my new code:
#ifndef _WIN32_ or WIN32 or _WINDOWS_ or WINDOWS std::cout<<"You are using an unfamiliar OS. . ."<<std::endl; #endif

New Topic/Question
Reply




MultiQuote








|