关于c中的一些新函数

localtime 和 localtime_s:

localtime:localtime(const time_t * _Time)

time_t t;
struct tm *local;
time(&t);
local=localtime(&t);

 localtime_s:localtime_s(struct tm * _Tm, const time_t * _Time)

time_t t;
struct tm local;
time(&t);
localtime_s(&local,&t);

所以原来用指针local表示的年月日等tm结构体成员成员一律要用指针->标示改成.标示。

原文地址:https://www.cnblogs.com/Daringoo/p/4230729.html