由于微软在VS2013中不建议再使用c的传统库函数scanf,strcpy,sprintf等,所以直接使用这些库函数会提示C4996错误,在源文件中添加以下指令就可以避免这个错误提示:法一:#define _CRT_SECURE_NO_WARNINGS把这个宏定义一定要放到.c文件的第一行。法二:在主函数任意一行加上如下代码:#pragma warning(disable:4996)如下图所示: