Vector报Expression: vector iterators incompatible崩溃错误

Vector报Expression: vector iterators incompatible崩溃错误

代码:

typedef struct tagOpenSrvAchieveCfg
{
    WORD id;
    WORD taskType;
    vector param1;
    vector param2; 
    vector param3; 
    tagOpenSrvAchieveCfg()
    {
                memset(this,0,sizeof(*this));
    }
}OPENSRVACHIEVECGF;

typedef struct tagOpenSrvAchieve
{
    std::vector taskCfg;
    tagOpenSrvAchieve()
    {
                memset(this,0,sizeof(*this));
    }
}TAGOPENSRVACHIEVE;

使用崩溃


image.png

查了很久查到一篇文章:


image.png

原文中链接里面有讲解这种报错的几种情况可以去看看:https://blog.csdn.net/yxnyxnyxnyxnyxn/article/details/17610899

你可能感兴趣的:(Vector报Expression: vector iterators incompatible崩溃错误)