ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/host/sysinfo/hostname.cc
Revision: 1.1
Committed: Tue Nov 7 17:54:52 2000 UTC (23 years, 3 months ago) by tdb
Branch: MAIN
CVS Tags: PROJECT_COMPLETION, HEAD
Log Message:
Hostname class and header file.

File Contents

# Content
1 #include "hostname.hh"
2
3 void printHostname() {
4 int namelen = MAXHOSTNAMELEN;
5 char *name = new char[namelen];
6 int res = gethostname(name, namelen);
7
8 cout << "hostname: " << name << endl;
9 }