Get the FREE certificate on C, C++, Java, Python, Perl, PHP, SQL, Linux & Javascript!  

CppBuzz.com
  
Home C C++ Java Python Perl PHP Spring SQL Javascript Linux

You are here : Home » C++ code to identify OS type

C++ code to identify OS type

#if defined(_AIX)
/* IBM AIX. ------------------------------------------------- */
#endif

#if defined(__hpux)
/* Hewlett-Packard HP-UX. ----------------------------------- */
#endif

#if defined(__linux__)
/* Linux. --------------------------------------------------- */
#endif

#if defined(__sun) && defined(__SVR4)
/* Solaris. ------------------------------------------------- */
#endif

Other links :

MCQ on C Programming  |  MCQ on C++ Programming  |  138+C++ F2F Interview Questions |  Basic Computer Questions |  Solved C programs  |  Solved C++ programs