vs2019下,程序结果能出来,但是出现Run-Time Check Failure #2 - Stack around the variable ‘XXX’ was corrupted.
发生异常错误Stack around the variable 'XXX' was corrupted
原因:
Stack pointer corruption is caused writing outside the allocated buffer in stack memory.
解决方案:
在项目属性下-》C/C++下的-》代码生成-》基本运行时检查
有一下几个选项:
(1) 默认值
(2) 堆栈帧 ( /RTCs )
(3) 未初始化的变量 ( /RTCsu )
(4) 两者 ( /RTC1, 等同与 /RTCsu )
(5) <从父级或项目默认设置继承>
发生异常错误Stack around the variable 'XXX' was corrupted
选择默认就合适了。

这里是引用

相关文章:

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