Could someone tell me how to initialize Vector of function pointer.`
void a(){cout << "godzilla_1";}
void b(){cout << "godzilla_2";}
void c(){cout << "godzilla_3";}
void d(){cout << "godzilla_4";}
vector<void(*)()> funcs = {a, b, c, d};
This gives me an error. in C++98 you can't initialize like this.
please give me a simple example.
You may not use initialiser lists before c++11. The following will work