|
From: Michael C. <jd...@ho...> - 2001-09-28 12:14:04
|
Hi,
This is a snippett of code I have written in the past. It was written for
HPUX 10.20 so there may be slight variations in your Windows example.
Just ignore the #define stuff.
#include <time.h>
# define LG_COUT_TIMED(streamExpr) \
do { \
const int DATE_LEN = 100; \
time_t t; \
tm tm_s; \
char date [DATE_LEN]; \
if ((time (&t) != (time_t) -1) && (localtime_r(&t, &tm_s) == 0)) \
{ \
strftime (date, DATE_LEN, "%c", &tm_s); \
cout << date << " : "; \
} \
cout << streamExpr << endl; \
} while (false)
>From: "Ricky boytoy" <boy...@ho...>
>Reply-To: dev...@li...
>To: dev...@li...
>Subject: [Dev-C++] i need help
>Date: Fri, 28 Sep 2001 12:01:34 +0000
>
>hey there hope u guys r in great shape!
>i need so examples of using the headerfile time.h in c++
>
>cud u just tell me some basic functions of time.h
>i look forward to hear from u
>thank u
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
|