如下:
Class CDemo
begin
std::vector<int> vec;
function test
begin
int aInt;
auto it = vec.begin;
while: it != vec.end
begin
/**********************************************/
/*
aInt = *it; 总是异常,
const auto _Mycont = static_cast<const _Myvec *>(this->_Getcont());
if (_Mycont == 0
|| _Ptr == _Tptr()
|| _Ptr < _Mycont->_Myfirst
|| _Mycont->_Mylast <= _Ptr)
{ // report error
_DEBUG_ERROR("vector iterator not dereferencable");
}
*/
aInt = *it;
it ++;
end
end
end
CArray<CDemo,CDemo& > arrDemo;
function test
begin
CDemo demo;
arrDemo.Add(demo);
arrDemo[0].vec.push_back(1);
arrDemo[0].test();
end