| shinkansen (5) | |||
|
Hi all, I am writing a C++ program which takes date & time input from the user. This is then parsed into a struct such as:
My question is: how can I convert such a struct into a time_t object, which is an unsigned long giving the time as the number of seconds elapsed since the epoch Jan 1st 1970, 00:00, as set out in time.h.I am wondering if this can be achieved using the standard library, or whether I just need to write a function to perform the appropriate arithmetic. Thanks guys :) Shinkansen | |||
|
|
|||
| shinkansen (5) | |
| That's terrific, thanks :) | |
|
|
|