aray of functions in c++
// create array of functions void a() { std::cout << "a\n"; } void b() { std::cout << "a\n"; } void c() { std::cout << "a\n"; } void d() { std::cout << "a\n"; } int main (void) { // array of functions void (*funcs[4])() = {a, b, c, d}; //call the first element of the array (*funcs[0])(); // output: "a\n" return 0; }