Hi All,
Please help my little prog to display date and time, but I want the time to display with ticking second and it's not doing that :-( why?
Thanks for any help. Borland C++ 3.0 compiler.
Code:
#include <stdio.h>
#include <conio.h>
#include <time.h>
#include <dos.h>
int main()
{
struct date d;
getdate(&d);
struct time t;
gettime(&t);
clrscr();
textcolor(14);
gotoxy(60,3);
printf("Date: %d/%d/%d",d.da_day,d.da_mon,d.da_year);
while (!kbhit())
{
gotoxy(60,4);
printf("Time: %2d:%02d:%02d",t.ti_hour, t.ti_min, t.ti_sec);
}
return 0;
}