VS2017如何使用scanf函数

前言

在VS2017中C++使用scanf函数,报出
错误 C4996 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

解决方法

在代码页首行加入如下代码

#define _CRT_SECURE_NO_WARNINGS

相关文章:

  • 2021-08-11
  • 2021-07-05
  • 2022-12-23
  • 2021-07-13
  • 2021-07-16
猜你喜欢
  • 2021-07-01
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2021-07-03
  • 2022-01-12
相关资源
相似解决方案