I've got this:
void (**funcs)();
funcs = new void (*)()[n];
And am getting errors about void, parenthesis, etc. What is the right syntax?
I know about vectors but I just want to know how it would be done this way.
If you insist on using raw pointers for some reason, or you're just curious, the syntax is:
void (**funcs)() = new (void(*[100])());
But seriously, just use std::vector:
std::vector<void(*)()> vec;
std::functionwithstd::vector.funcs = new (void (*[3])());