头文件 time.h
void printDate()
{char buff1[256];
char buff2[256];
time_t t = time(NULL);
strftime(buff1, sizeof(buff1), "%Y%m%d-%H%M%S", localtime(&t));
printf("%s\n", buff1);
}
输出结果;
2017/09/02-21:15:41
请按任意键继续. . .
头文件 time.h
void printDate()
{}
输出结果;
2017/09/02-21:15:41
请按任意键继续. . .