比如:warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
在stdafx.h中添加如下:
#define _CRT_SECURE_NO_WARNINGS
參考:
https://www.cnblogs.com/douzi2/p/3974959.html