Function to print STL

Hi All,
everytime I have to print out the vlaues in the STL. I end uup either using BOOST_FOREACH, or iterators or jsut counters.

Is there a function, whether in boost or STL which can help me print with a single function call
either
STL.printVals();
or
printVals (STL);

Thanks.

Neeraj

What are you going to print out?
create a template function in a header file that prints elements of STL containers. use iterators in it.
Then call this fuunction every time you want to print elements.

Print(STL_Container);
Topic archived. No new replies allowed.