using boost.foreach with boost.array

2 Feb
2009
2 Feb
'09
12:01 p.m.
Hi: is it possible to use boost.foreach with boost.array? Cheers Sean.

2 Feb
2 Feb
2:12 p.m.
On Mon, Feb 2, 2009 at 12:01 PM, Sean Farrow <sean.farrow@seanfarrow.co.uk>wrote:
Hi: is it possible to use boost.foreach with boost.array? Cheers Sean.
What do you think? #include <boost/array.hpp> #include <iostream> #include <boost/foreach.hpp> int main( ) { boost :: array<char, 6> s = { 'H', 'e', 'l', 'l', 'o', '\n' }; BOOST_FOREACH( char c, s ) { std :: cout << c; } std :: cout << "\n"; } -- ACCU - Professionalism in programming - http://www.accu.org
5970
Age (days ago)
5970
Last active (days ago)
1 comments
2 participants
participants (2)
-
Robert Jones
-
Sean Farrow