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!
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"));
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thanks a lot laserlight!