A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
Consider the following which uses the function pointers to produce output -
#include <iostream>
void cc(void (*pFunc)())
{
std::cout << "1\n";
pFunc();
}
void vv()
{
std::cout << "2\n";
}
void test(void (*pFunc)(void (*)()), void (*pFunc1)())
{
pFunc(pFunc1);
}
int main()
{
test(cc, vv);
return 0;
}