Finding the windows version...
Hey guys,
I have searched everywhere, and I can't find a good way to identify the windows version. Just to let you know what's going on, take a look at my algorithm:
Code:
#include <iostream.h>
#include <windows.h>
char ReturnWinVersion(char WinVer[]);
int main()
{
char* Version = ReturnWinVersion();
if (Version = win9x)
{
do this...
}
if (Version = winNT)
{
do this...
}
if (Version = WinXP)
{
do this...
}
return 0;
}
char ReturnWinVersion(char WinVer[]);
{
***This is where I'm stuck!***
return WinVer[];
}
As you can see, this is very messy coding, but I don't care at this point. Is there a good way to do this... the way I want? I know about the GetVersion() function, but I don't understand how to work with it.
Thanks.