![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The localtime
function returns a pointer to a structure of type
tm
, which is defined in the time library. Accordingly,
you need a pointer variable of that same tm
type to hold
on to the value returned by localtime
:
/* Declare pointer to a tm object containing time information */ struct tm *time_structure_pointer; ... /* Use elapsed seconds to update time-structure object */ time_structure_pointer = localtime (&elapsed_seconds);