Category : C++ Source Code
Archive   : CPPTUT.ZIP
Filename : NEWDATE.CPP

 
Output of file : NEWDATE.CPP contained in archive : CPPTUT.ZIP
// Chapter 7 - Program 10
#include "newdate.h"

extern int days[];

// This routine ignores leap year for simplicity, and adds
// the days in each month for all months less than the
// current month, then adds the days in the current month
// up to today.
int new_date::get_day_of_year(void)
{
int index = 0;

day_of_year = 0;

while (index < month)
day_of_year += days[index++];

return (day_of_year += day);
}


  3 Responses to “Category : C++ Source Code
Archive   : CPPTUT.ZIP
Filename : NEWDATE.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/