Hello
Whats that trick with boost::bind that will print (std::cout) the whole container (for instance std::vector<std::string>) with one line of code?
Thanks!
Printable View
Hello
Whats that trick with boost::bind that will print (std::cout) the whole container (for instance std::vector<std::string>) with one line of code?
Thanks!
You do not necessarily have to use Boost, e.g.,
Code:// Suppose words is a std::vector<std::string>
std::copy(words.begin(), words.end(), std::ostream_iterator<std::string>(std::cout, "\n"));
Thanks a lot laserlight!