cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
detecting os during runtime
detecting os during runtime
May 20, 2016 at 9:01pm UTC
stav
(188)
how do i go about detecting the os during runtime rather than compile time?
(so that i only have to compile one program and it'll be able to run different code depending on what the os supports)
Last edited on
May 20, 2016 at 9:02pm UTC
May 21, 2016 at 12:47am UTC
helios
(17574)
Do you mean different versions of the same OS? You can't, generally speaking, run the same executable on different platforms, so why would you want to include code that will never execute on that machine?
Topic archived. No new replies allowed.