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

You are here : Home » C++ » 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