实现代码如下:

#include <stdio.h>
#include <dos.h>
int main()
{     /*getdate()函数的用法*/
    struct date d;
    getdate(&d); //获取DOS日期
    printf("the current year is:%d\n",d.da_year);//cprintf和printf用法是不同的
    printf("the current day is:%d\n",d.da_day);
    printf("the current month is:%d\n",d.da_mon);
    getch();
    return 0;
}

以上就是【getdate()函数的用法实例】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论