View Single Post
Join Date: Aug 2005
Posts: 15,142
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1434
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: need urgent responce please!

 
0
  #4
Dec 1st, 2008
Can you use the functions in time.h? If you can, then just fill in a struct tm and call mktime() to calculate tomarrow
  1. #include <time.h>
  2. ...
  3. int main()
  4. {
  5. int m = 11; // November
  6. int y = 2008;
  7. int d = 2;
  8.  
  9. struct tm tm;
  10. // clear all members of the structure
  11. memset(&tm,0,sizeof(struct tm));
  12.  
  13. tm.tm_year = y-1900;
  14. tm.tm_mon = m-1;
  15. tm.tm_day = d;
  16. // increment tomarrow
  17. tm.tm_mday++;
  18. mktime(&tm);
Last edited by Ancient Dragon; Dec 1st, 2008 at 7:55 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote