我用time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); printf("程序运行开始,Currentlocal time and date: %s\n", asctime(timeinfo));……printf("程序运行结束,Currentlocal time and date: %s", asctime(timeinfo));
1 回答
胡子哥哥
TA贡献1825条经验 获得超6个赞
这样干,你少写了两行
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
printf("程序运行开始,Currentlocal time and date: %s\n", asctime(timeinfo));
……
time ( &rawtime );
timeinfo = localtime ( &rawtime );
printf("程序运行结束,Currentlocal time and date: %s", asctime(timeinfo));
添加回答
举报
0/150
提交
取消