Getting Computer information

Can someone share a code. I am using dev-c++. Creating console app.
I need to gather information about computer(computer name, users name, RAM, processor, etc...)
And... for example variable = computer name; Because I want to use it like
cout << computername << usersname << endl;
Thanks.
I don't get how to use it... Is somewhere tutorial for that? Would be best a video tutorial.
i got code and it works for me.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <windows.h>
#include <tchar.h>
#include <stdio.h>

int main(void)
{
TCHAR nameBuf[MAX_COMPUTERNAME_LENGTH + 2];
DWORD nameBufSize;

nameBufSize = sizeof nameBuf - 1;
if (GetComputerName(nameBuf, &nameBufSize) == TRUE) {
_tprintf(_T("Your computer name is %s\n"), nameBuf);
}

return 0;
}


But i want to make variable equal to computers name.
I want to use it like
cout << computername << endl;
Can someone help me?
Topic archived. No new replies allowed.