hi all,

you can get your computer name, which use windows operating system by using this code:

/*********/
#include <iostream>
#include <windows.h>
using namespace std;

int main(){

char name[100];
DWORD length=100;
GetComputerName(name, &length);

cout<<name<<endl;
return 0;
}
/*********/


Related posts:

  1. get machine local time using c++, windows only
  2. Generate students emails based on there id number
  3. Binary, Octal, Decimal and Hexadecimal converter(Java)
  4. Computer Terminology
  5. Need Windows 7 Look !!