[user02@FC4 Lesson12]$ cat -n showtime.cpp
1 #include <iostream>
2 #include <ctime> // For run-time library functions
3 using namespace std;
4
5 int main()
6 {
7 time_t system_time;
8
9 system_time = time(NULL);
10
11 cout << "The current system time is " << ctime(&system_time) << endl;
12
13 return 0;
14 }
[user02@FC4 Lesson12]$ g++ -o showtime showtime.cpp[user02@FC4 Lesson12]$ ./showtime
The current system time is Tue Aug 9 03:36:25 2005
[user02@FC4 Lesson12]$
lesson_12_showtime.cpp, Rev. 2, Last changed on 2005-08-18 06:59, 343 page hits