Of Memory Management, Heap Corruption, and C++

后端 未结 12 1883
半阙折子戏
半阙折子戏 2020-12-01 02:54

So, I need some help. I am working on a project in C++. However, I think I have somehow managed to corrupt my heap. This is based on the fact that I added an std::stri

12条回答
  •  悲哀的现实
    2020-12-01 03:58

    It could be heap corruption, but it's just as likely to be stack corruption. Jim's right. We really need a bit more context. Those two lines of source don't tell us much in isolation. There could be any number of things causing this (which is the real joy of C/C++).

    If you're comfortable posting your code, you could even throw all of it up on a server and post a link. I'm sure you'd gets lots more advice that way (some of it undoubtedly unrelated to your question).

提交回复
热议问题