[英]Find where a vector subscript is out of range
I am getting the error "Vector subscript out of range". 我收到错误“向量下标超出范围”。 I know this means I've called a non-existant index in the vector.
我知道这意味着我已经在向量中调用了不存在的索引。 But how can I find the offending vector?
但是如何找到令人讨厌的向量? The windows debugger doesn't seems to help much.
Windows调试器似乎没有太大帮助。
You run your program inside a debugger, and you ask that debugger to stop when the program encounters a fatal error (in every debugger I've seen, this is the default behavior). 您在调试器中运行程序,并要求该调试器在遇到致命错误时停止运行(在我所见过的每个调试器中,这都是默认行为)。 When the program crashes, you ask the debugger what line it was executing.
当程序崩溃时,您询问调试器它正在执行哪一行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.