5 Aug
2007
5 Aug
'07
9:51 p.m.
chun ping wang wrote:
Hi i would like to know whats the best way to use BOOST_FOREACH and iterator.
Example...
BOOST_FOREACH(char c, String str) { first_c = c; // blah.. first iterator = c after condition x. second_c = c; // blah... second iterator = c after condition y. }
str2.insert(first_c, second_c).
You mean, you want to get an iterator representing the current position of the iteration? Sorry, you can't do that. Don't use FOREACH; use a regular for(;;) loop. -- Eric Niebler Boost Consulting www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com