Can you use the functions in time.h? If you can, then just fill in a struct tm and call mktime() to calculate tomarrow
#include <time.h>
...
int main()
{
int m = 11; // November
int y = 2008;
int d = 2;
struct tm tm;
// clear all members of the structure
memset(&tm,0,sizeof(struct tm));
tm.tm_year = y-1900;
tm.tm_mon = m-1;
tm.tm_day = d;
// increment tomarrow
tm.tm_mday++;
mktime(&tm);
Last edited by Ancient Dragon; Dec 1st, 2008 at 7:55 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,947 posts
since Aug 2005