Showing 1 post
This does not build. Can you guess why? Without testing it?std::set< int > numbers; for (int i = 0; i < 10; i++) numbers.insert(i); for (std::set< int >::iterator iter = numbers.begin(); iter != numbers.end(); iter++) { int& i = *iter; i++; }Update (23:40): John gave a correct answer in the comments.
February 8, 2008
·
Tags:
<a href="/tags/cxx">cxx</a>, <a href="/tags/teasert">teasert</a>
Continue reading (about
1 minute)