C语言获得系统当前日期和时间

#include <stdio.h> #include <time.h> int main() { time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); printf ( "/007The current date/time is: %s", asctime (timeinfo)); }

你可能感兴趣的:(c,语言,include)