How to Detect Operating system using C++
In this tutorial, we will learn how to detect operating systems using C++. Detecting operating systems is a common requirement when you develop a cross-platform project that’s why today we learn how to detect the operating system using C++. Detect Operating system using C++ #include <iostream> #if defined(_WIN32) const std::string OS = “Windows”; #elif defined(__APPLE__) …