void fun(int a) {}
int main()
{
// fun_ptr is a pointer to function fun()
void (*fun_ptr)(int) = &fun;
/* The above line is equivalent of following two
void (*fun_ptr)(int);
fun_ptr = &fun;
*/
// Invoking fun() using fun_ptr
(*fun_ptr)(10);
// type of fun_ptr is void (*)(int)
return 0;
}
std::function<void(void)> f = std::bind(&Foo::doSomething, this);