注:首先我先说一下由于VS版本的更新,Visual Studio软件上对scanf函数的使用,是不同于其他版本,Visual Studio 2022及以上的版本用的是scanf_s函数进行输入读取,因为S 认为scanf存在缓冲区溢出风险,默认禁用了这类 “不安全” 函数,要求你使用微软提供的安全替代函数scanf_s,或手动关闭该警告。
以上我在VS写的代码检测到的错误只有scanf': This function or variable may be unsafe. Consider using scanf s instead. To disable deprecation, useC4996test2test.c26CRT SECURE NO_WARNiINGS. See online help for details.这一个错误导致编译失败