11 May
2005
11 May
'05
5:27 a.m.
Martin wrote:
map<int,int> m; ... FOREACH (map<int,int>::value_type i, m) {...} // compiles map<int,int>::value_type i; FOREACH (i, m) {...} // COMPILE ERROR
Why not
map<int,int>::value_type& i; FOREACH (i, m) {...}
Would it not have to be FOREACH(map<int,int>::value_type& i, m) { } ? Cheers Russell