#include <iostream>
#include <stdio.h>
#include <time.h>
using namespace std;
int main(int argc, char *argv[])
{
char sz[] = "Hello, World!"; //Hover mouse over "sz" while debugging to see its contents
cout << sz << endl; //<================= Put a breakpoint here
time_t timep;
time(&timep);
struct tm *ptm=gmtime(&timep);
printf("%d-%d-%d\n", 1900 + ptm->tm_year, 1 + ptm->tm_mon, ptm->tm_mday);
printf("%d:%d:%d\n", ptm->tm_hour, 1 + ptm->tm_min, ptm->tm_sec);
return 0;
}
gmtime
最新推荐文章于 2024-06-08 23:34:42 发布