
23 Aug
2006
23 Aug
'06
5:04 p.m.
On 8/23/06, Phillip Hellewell <sshock@gmail.com> wrote:
[snipped]
Now after going to ALL that work just so you can use for_each, don't you just want to forget it and use iterators?
for( map<string, int>::const_iterator it = m.begin(); it != m.end(); ++it ) m2.insert(*it);
And after ALL this, you could write just: std::map<std::string, int> m2(m1); What am I missing? maps are copy-constructible!
Phillip Hellewell
-- Felipe Magno de Almeida