迭代器失效,悬赏高分
逻辑思维C 2011-05-03 10:37:19 各位高人:
我有一个包含迭代器指针的数据结构如下:
typedef struct
{
ZhenType Zhen[MaxKouNum];
Type[MaxKouNum];
unsigned char ProType;
OType::iterator FollowOIt;
PType::iterator FollowPIt_Qian;
P_Type::iterator FollowPIt_Hou;
unsigned int ZhanKai;
unsigned char FangXiang;
XuLie_Type XuLie;
} CLine_Type;
问题是,我一创建CLine_Type对象便导致我某个list迭代器失效程序中断,说明数据结构中的迭代器是指向程序中一些在使用的容器。大家能帮我分析分析吗?如果不使用迭代器,还可以用什么来做呢?