Thanks Roman. Will do.
On 5/21/07, Roman Perepelitsa
Christian Henning
writes: Thanks a lot, again.
This is the working code now. [cut]
You can use transform + ostream_iterator instead of for_each + print.
transform( m_data.begin() , m_data.end() , ostream_iterator<string>(cout, "\n") , boost::bind( &Base::to_String , _1 , indent_value));
And instead of handcrafted loop for indentation you can use constructor of std::string.
virtual string to_String ( boost::uint32_t indent ) { stringstream output; output << string(indent, ' ') << m_value; return output.str(); }
Roman Perepelitsa.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users