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. ------------------------------------------------- */

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

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

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

Other links

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