天天看點

遇到To disable deprecation, use _CRT_SECURE_NO_WARNINGS

程式編譯過程中遇到

 error C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

 : 參見“localtime”的聲明

解決方法:在項目屬性——指令行中添加 /D _CRT_SECURE_NO_WARNINGS 

繼續閱讀