So, I execute this function while executing this function
class vector <Record<value> >::iterator itr = records.begin();
for (; itr != records.end(); ++itr) {
if (itr->isSelected()) {
itr = records.erase(itr);
recordSize--;
}
}
where my vector matters vector <Record <value> > records;, and the function isSelected()is simple boolean, which is either true when the object is selected, or false when it is not.
Can someone help me please, I don't see a problem with this like that.
source
share