0 votes
27 views
asked in C++ by

1 Answer

0 votes
answered by

Here is some sample code that shows how to get the date and time on a DOS system. 
 

#include
#include
#include

void main()
{
  struct dosdate_t govind;
  _dos_getdate(&govind);
  clrscr();
  printf("The current year is: %d\n", govind.year);
  printf("The current day is: %d\n", govind.day);
  printf("The current month is: %d\n", govind.month);
}

Categories

...