|
From: Dondolo M. <MDo...@OL...> - 2003-02-05 14:00:35
|
Hi all,
Can anybody tell me what I am doing wrong. I get an error
"aggregate struct dos_date_t today has incomplete type and cannot be
initialised."
can some one please help me reconstruct the syntax
//program displaying the date and time
//
#include<iostream.h>
#include<stdlib.h>
#include<dos.h>
main()
{
struct dos_date_t today;
struct dos_time_t theTime;
dos_getdate( &today );
cout<<"The date is "<<(int)today.month
<<"/"<<(int)today.day<<"/"<<today.year<<"\n";
dos_gettime( &theTime);
cout<<"The time is "<<(int)theTime.hour<<":";
if(theTime.minute<10)
cout<<'0';
cout<<(int)theTime.minute<<":";
if(theTime.seconds<10)
cout<<'0';
cout<<(int)theTime.seconds<<"\n";
system("PAUSE");
return 0;
}
Mpho Dondolo
Support Analyst
CSC Computer Sciences (South Africa) (Pty) Ltd
Tel: +27 21 5030056
Cell: +27 84 3371468
Fax: +27 21 5095619
Email:MDo...@ol...
Email: MDo...@cs...
"How do you claim to have loved,
when you have never loved unconditionally"
|