時間のC言語の関数とlocaltimeの機能
#pragma警告は、(無効:4996)// 無効エラーC4996 の#include <TIME.H> int型のmain(){ time_tのT =時間(NULL); //は、現在の時刻ハンドルを取得し、time_t型はInt64型である (TM)* PTIME = localtimeの(&T ); // ハンドルが時間構造TMに変換される時、前者の機能をlocaltimeのエラーC4996を報告することが / * (localtime_sを使用) (登録商標)時間; localtime_s(&時間、&T); (TM)* PTIME =&時間; * / int型 nYear = ptime->のtm_year + 1900 ; INT nMonth = ptime-> tm_mon + 。1 ; INT nday = ptime-> tm_mday、 INTnHour = ptime-> tm_hour。 int型 nMinute = ptime-> tm_min。 int型 nSecond = ptime-> のtm_sec。 printf(" %D-%02d-%02D%02D:%02D:%02D " 、nYear、nMonth、nDay、nHour、nMinute、nSecond)。 リターン 0 ; }