Hi all,
Is there any program in C++ that extracts the version number of the Operating system being used in the system.If, yes wats that.
Printable View
Hi all,
Is there any program in C++ that extracts the version number of the Operating system being used in the system.If, yes wats that.
You would need to use a system() call, most likely, and what you call will depend on the OS (i.e., there's not something out there that's going to work on windows, mac, and debian all at the same time).
I wouldn't use a system() call on Windows, I'd probably use GetVersionEx().
As for Linux, there's probably a better call for that, but I'm too lazy to look it up right now.
i just want to focus on windows operating system only
Moved to Windows programming.
Well then, like cpjust said, look for GetVersionEx().
If you are not familiar with MSDN, you should really take the time to see how it's organized; it will really pay off if you are doing Windows programming...