std::out_of_range异常问题

2020-05-25  本文已影响0人  烟花繁江尘辗

C++如果遇到:

    1."terminate called after throwing an instance of 'std::out_of_range'"

    2."Abort message: 'terminating with uncaught exception of type std::out_of_range"

这样的错误,极有可能是访问越界的问题。

导致越界的原因:

  通常情况是在使用c++的容器的时候出现的问题,如在使用vecto、map等的时候出现的

上一篇 下一篇

猜你喜欢

热点阅读