Boost ForEach Question
Posted
by bobber205
on Stack Overflow
See other posts from Stack Overflow
or by bobber205
Published on 2010-05-16T19:10:39Z
Indexed on
2010/05/16
19:20 UTC
Read the original article
Hit count: 161
Trying to use something like the below with a char array but it doesn't compile. But the example with short[] works fine. Any idea why? :)
char someChars[] = {'s','h','e','r','r','y'};
BOOST_FOREACH(char& currentChar, someChars)
{
}
short array_short[] = { 1, 2, 3 };
BOOST_FOREACH( short & i, array_short )
{
++i;
}
© Stack Overflow or respective owner