How do I pass a function as parameter?
<p>What is the fastest and shortest way to pass a function as parameter of another function without using other libraries other than the std one in just one line?</p>

<p>I mean let's say we have a function <code>forloop(int x, *) {...}</code> that run a for loop from <code>0</code> to <code>x</code> running the <code>*</code> function; the function call should be something like: <code>forloop(3, **() { std::cout "Hi!"; });</code>.</p>

<p>PS: <code>*</code> and <code>**</code> are just placeholders for the function-by-argument type and the way to pass the function as argument.</p>
