21 May
2007
21 May
'07
6:47 a.m.
Christian Henning
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.