1. 程式人生 > >調用系統時間

調用系統時間

pause oca printf pri clas div 系統時間 logs lib

VS中編譯通過:

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
    printf("This is a test!\n");
    time_t rawtime;
    rawtime = time(NULL);
    struct tm *systime = localtime(&rawtime);
    printf("Time is: %s", asctime(systime));
    system("pause");
}

調用系統時間