长汀古街:C语言中时间函数
来源:百度文库 编辑:神马品牌网 时间:2024/05/06 02:18:25
请高手帮忙写一个C语言程序,
命题:输出本地时间
越简单越好!
先谢过了
命题:输出本地时间
越简单越好!
先谢过了
#include <cstdlib>
int main()
{
system("date /t");
system("time /t");
system("PAUSE");
return EXIT_SUCCESS;
}
#include <stdlib.h>
main()
{
system("date /t");
}
本着越复杂越好的观点,给出一个。
下载apr-1.2.7.zip,使用vC6编译出.dll文件,链接。
#include "apr.h"
#incluee "apr_time.h"
int main() {
apr_time_t time;
time=apr_time_now();
char strtime[APR_CTIME_LEN];
apr_ctime(strtime,time);
printf("NOW: %s",strtime);
return 0;
}