Re: [Dev-C++] How to show current time?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Andrew S. <sas...@ho...> - 2004-04-23 14:13:25
|
You are lucky, I just researched this earlier this week. Here is how I'm = doing it: #include <time.h> time_t t =3D time(0); struct tm* tm =3D localtime(&t); cout << "Date and time: " << asctime (tm); //built in end of line This ends up looking like: Date and time: Wed Apr 21 16:30:46 2004 ----- Original Message -----=20 From: internet100=20 To: dev...@li...=20 Sent: Friday, April 23, 2004 1:10 AM Subject: [Dev-C++] How to show current time? I need a function that shows in the screen the current time(hour, = minutes, seconds, day and month), how to do it?=20 Already I searched in some places but I did not find nothing on this. |