Friday, 1 June 2012
0
Friday, 1 June 2012
Display Date and Time in C++
Here is some sample code that shows how to get the date and time on a DOS system.
Comment & Share with Friends :)
#include
#include
#include
void main()
{
struct dosdate_t tipsplanet;
_dos_getdate(&tipsplanet);
clrscr();
printf("The current year is: %d\n", tipsplanet.year);
printf("The current day is: %d\n", tipsplanet.day);
printf("The current month is: %d\n", tipsplanet.month);
}
Comment & Share with Friends :)
Subscribe to:
Post Comments (Atom)
0 Responses to “Display Date and Time in C++”
Post a Comment