G
Gernot Frisch
in a vector I do this:
for (int i=0; i<v.size(); ++i)
{
if (...) {v.erase(v.begin() + i); --i; continue;}
}
.... how to do this with a list?
for (it = l.begin(); it!=l.end(); ++it)
{
if(...) {MYLIST::iterator it2 = it; --it2; l.erase(it); continue;}
}
what if "it == l.begin()" ?? How else to do this?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
for (int i=0; i<v.size(); ++i)
{
if (...) {v.erase(v.begin() + i); --i; continue;}
}
.... how to do this with a list?
for (it = l.begin(); it!=l.end(); ++it)
{
if(...) {MYLIST::iterator it2 = it; --it2; l.erase(it); continue;}
}
what if "it == l.begin()" ?? How else to do this?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com