struct _my_struct
{_my_struct(){listInt.clear();}_my_struct & operator = (_my_struct & s){listInt.clear();std::list<int>::iterator itZone;//报异常/*_Mynextiter = _Parent_proxy->_Myfirstiter;引发了异常: 读取访问权限冲突。*/itZone = s.listInt.begin();while (itZone != s.listInt.end()){unsigned long l = *itZone;listInt.push_back(l);itZone++;}return *this;}std::list<int> listInt;
};CArray<_my_struct, _my_struct &> myArray;
_my_struct myItem;
for (int i = 0; i < 5; i++)
{myItem = _my_struct();myItem.listInt.push_back(i);myArray.Add(myItem);
}for (int i = 0; i < myArray.GetCount(); i++)
{//这个语句引发异常_my_struct myItem2 = myArray[i];
}