Original Post
🔒 Locked
what os?
Advertisement
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;
}
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement