#Lost at C (Again!)
17-Mar-87 18:08:00
Sb: #59307-#Lost at C (Again!)
Fm: Don Curtis/SYSOP 76703,4321
To: Richard Rae/SYSOP 76703,4253
Rick,
I'm not at home, so can't look up any of this, but off the top of my
head (which could be in never never land also) I'd say you haven't bothered
equating pointer to anything and thus haven't filled out time_struct.
Try this before your printf() call:
time_struct.tm_sec = pointer->tm_sec;
time_struct.tm_min = pointer->tm_min;
or
time_struct.tm_sec = localtime(&value)->tm_sec;
time_struct.tm_min = localtime(&value)->tm_min;
In otherwords, you've created a pointer to a structure, but haven't
equated the values within that structure to your structure. Also, I suspect
that localtime() uses a temporary structure and the 2nd set of code may be more
proper.
Don