
For some reason this thing don't work. I want to print a container of
container.....
#ifndef ARRAY_OPERATION_HPP
#define ARRAY_OPERATION_HPP
#include <iostream>
#include
void print_array(const CONT<T>& array)
{
using namespace boost::lambda;
std::for_each(array.begin(), array.end(), std::cout << _1 << " ");
}
template
void print_2darray (const CONT
"chun ping wang"
writes: Heres a simple question, that i want to do.
Lets say you have a function call void f(double);
and then you want to apply f to each argument inside vector<double> a;
for_each(a.begin(), a.end(), f(_1));
// the example above isn't possible..is there a simple way to do this?
for_each(a.begin(), a.end(), bind(f, _1));
HTH,
-- Dave Abrahams Boost Consulting www.boost-consulting.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users