#include
#include
#include
using namespace std;
template
class Print
{
public:
void operator()(const T& t)
{
cout << t << " ";
}
};
int main()
{
Print DoPrint;
vector vInt(5);
for (int i = 0; i < 5; ++i)
vInt[i] = i * 3;
cout << "for_each()\n";
for_each(vInt.begin(), vInt.end(), DoPrint);
cout << "\n";
return 0;
}