Hi all,
I have the following code (just typed it in here, might have typos or stuff):
typedef boost::ptr_vector<SomeClass> tvec;
tvec v;
// ... fill v ...
tvec vsnap;
for(tvec::iterator it = v.begin(); it != v.end(); ++it)
{
if((*v).anyCondition)
vsnap.push_back( it ); // (*it) or &(*it) doesn't work
}
My problem is now that i cant push_back an iterator in any way, I just don't get the pointer out of the iterator.
Is there an easy way i didnt see, or are boosts ptr_vector the false choice for this case?
Thanks in advance.