You are here: Hello world / Howto / Programming Hints   Software Development hints.

Programming Hints

These page is mostly a reference for myself. Feel free to mail me your comments ;-)

C++

Dump some container

This is an example how to use the copy algorithm with the ostream_iterator to dump anything which provides an input_iterator.

list l ; // just an example for some container
copy (l.begin (), l.end (), ostream_iterator (cout, "\n")) ;

Author: Tobias Jahn
Public key fingerprint: 0556 B7D8 93FB 0304 B868 9FBA 3A71 E4F9 AE03 4AAD
Last modification of this page: 2002-05-17 15:46 GMT
Last generation of this page: 2007-06-16 20:26 GMT
Valid HTML 4.0!