RosettaCodeData/Task/Higher-order-functions/C++/higher-order-functions-1.cpp

21 lines
211 B
C++

#include <tr1/functional>
#include <iostream>
using namespace std;
using namespace std::tr1;
void first(function<void()> f)
{
f();
}
void second()
{
cout << "second\n";
}
int main()
{
first(second);
}