I’ve created a set list in c++
and fullfilled with elements
std::set<Unit*> myUnits;
for(std::set<Unit*>::iterator i = myUnits.begin(); i != myUnits.end(); i++) {
if() {}
}
So i want in if to check every element of the setlist, what have to put in if?
Unit* pUnit = *i;will give you a pointer to aUnitobject. By the way, the correct term for the container is “set”, not “setlist”.