A
akush
Hello!!
i try to create a pointer on an iterator for a vector list ( with more
than one values ). But if i iterate i only get the first value. if i
want to get the next the program crahes. what i have made wrong?
code example:
TestList::iterator * listIter = new TestList::iterator();
*listIter = list->begin();
Test * tt1 = **listIter;
**listIter++; // <--- works correct
Test * tt2 = **listIter;
**listIter++; // <--- crash
Thanks for help
akush
i try to create a pointer on an iterator for a vector list ( with more
than one values ). But if i iterate i only get the first value. if i
want to get the next the program crahes. what i have made wrong?
code example:
TestList::iterator * listIter = new TestList::iterator();
*listIter = list->begin();
Test * tt1 = **listIter;
**listIter++; // <--- works correct
Test * tt2 = **listIter;
**listIter++; // <--- crash
Thanks for help
akush