Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Your results are time_t's (or should be)
struct tm * timeinfo = localtime(&res[i][1]);
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
>>time_t now = time(res[i][1]);
That's wrong -- the parameter to time is a pointer to a time_t object. I don't know what you are passing but it isn't time_t*
If you are attempting to convert the date/time in the result set to time_t, that is the wrong way to do it. win32 api FileTimeToSystemTime () will convert that FILETIME object to a SYSTEMTIME structure, which is similar to struct tm, but has milliseconds, and you can easily access the month, day, year, hour, minutes, seconds, and milliseconds.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343