Re: list.remove() crash.
From: Jerry Coffin (jcoffin_at_taeus.us)
Date: 05/16/04
- Next message: Evgeny Durtsev: "MDICLIENT window without WS_EX_CLIENTEDGE style"
- Previous message: Jerry Coffin: "Re: PieChart"
- In reply to: Polaris: "Re: list.remove() crash."
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 16 May 2004 01:25:53 -0600
In article <ehIQgShOEHA.2844@tk2msftngp13.phx.gbl>,
etpolaris@hotmail.com says...
> Thanks for your info. That will not work for me because I need to remove
> certain items from the list. What I' doing now is to put those items to be
> removed into a seperat array and then remove() them one by one. it seems
> working. but still, I think there should be better way. Thanks.
There is. Look up std::list::remove_if. Just for example, to remove
every item less than 100 from a list of ints:
std::list<int> integers;
integers.remove_if(std::bind2nd(std::less<int>(), 100));
--
Later,
Jerry.
The universe is a figment of its own imagination.
- Next message: Evgeny Durtsev: "MDICLIENT window without WS_EX_CLIENTEDGE style"
- Previous message: Jerry Coffin: "Re: PieChart"
- In reply to: Polaris: "Re: list.remove() crash."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|