Is there a more straight-forward way to do this?
for_each(v_Numbers.begin(), v_Numbers.end(), bind1st(operator<<, cout));
Without an expli
Yep, but you must use std::copy algorithm:
#include #include #include int main() { std::vector a; // fill a... std::copy(a.begin(), a.end(), std::ostream_iterator(std::cout)); }