View Full Version : A little C++ help, please.
ErusGuleilmus
March 9th, 2008, 03:59 AM
Hello,
What code would I use in C++ to find what OS the program is running on?
Thanks, and sorry for wasting your time with a stupid question.
-Erus
LaRoza
March 9th, 2008, 05:01 AM
Er, if it is compiled and running, you can assume it is running on the OS you compiled it for.
ErusGuleilmus
March 9th, 2008, 05:02 AM
Clarification: Sorry, I meant what version of Ubuntu it is being run on.
LaRoza
March 9th, 2008, 05:09 AM
Clarification: Sorry, I meant what version of Ubuntu it is being run on.
Parse: /etc/issue.
Martin Witte
March 9th, 2008, 01:47 PM
As alternative for the already mentioned method you can parse the output of command lsb_release -a, or lsb_release -rci
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.