[ create a new paste ] login | about

Link: http://codepad.org/1Fkc9y9b    [ raw code | output | fork ]

uskz - C++, pasted on Feb 14:
1
2
3
4
5
6
7
8
9
10
#include <iostream>
#include <boost/foreach.hpp>

int main()
{
    int xs[3] = { };
    BOOST_FOREACH(int x, xs) std::cout << x << std::endl;
    BOOST_FOREACH(int& x, xs) ++x;
    BOOST_FOREACH(int x, xs) std::cout << x << std::endl;
}


Output:
1
2
3
4
5
6
0
0
0
1
1
1


Create a new paste based on this one


Comments: