|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <dos.h>
#include <stdio.h>
void main()
{
struct date d;
struct time t;
getdate(&d);
gettime(&t);
printf("the current day is: %d--%d--%d\n", d.da_year, d.da_mon, d.da_day);
printf("the current time is:%d:%d:%d", t.ti_hour, t.ti_min, t.ti_sec);
getch();
}
日期及时间.c
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(6) : error C2079: 'd' uses undefined struct 'date'
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(7) : error C2079: 't' uses undefined struct 'time'
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(8) : warning C4013: 'getdate' undefined; assuming extern returning int
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(9) : warning C4013: 'gettime' undefined; assuming extern returning int
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(10) : error C2224: left of '.da_year' must have struct/union type
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(10) : error C2224: left of '.da_mon' must have struct/union type
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(10) : error C2224: left of '.da_day' must have struct/union type
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(11) : error C2224: left of '.ti_hour' must have struct/union type
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(11) : error C2224: left of '.ti_min' must have struct/union type
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(11) : error C2224: left of '.ti_sec' must have struct/union type
D:\C语言\MSDev98\MyProjects\日期及时间\日期及时间.c(12) : warning C4013: 'getch' undefined; assuming extern returning int
执行 cl.exe 时出错.
日期及时间.obj - 1 error(s), 0 warning(s)
|
|