Skip to main content
gamedev.net
🔒 Locked

what os?

Started by jonnii 2 replies 150+ views
Original Post
jonnii
jonnii
Is it possible to have a windows API call that tells you which version of windows the user is using? Similarly is this possible to do in other OS''s? thanks -jonnii
-jonnii=========jon@voodooextreme.comwww.voodooextreme.com
IndirectX
IndirectX
GetVersionEx.
---visit #directxdev on afternet <- not just for directx, despite the name
smart_idiot
smart_idiot
I think this will work, but I''ve never tried it before. If it does, it should be OS independent.

  
#include <iostream>
#include <sys/utsname.h>

int main()
{
struct utsname info;

if(uname(&info)>=0)
{
cout << "System: " << info.sysname << endl;
cout << "Release: " << info.release << endl;
cout << "Version: " << info.version << endl;
}
else
cout << "Something went horribly wrong." << endl;

return 0;
}
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other
Oluseyi
Oluseyi
utsname.h is a UNIX header file.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.