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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you insist on using raw pointers for some reason, or you’re just curious, the syntax is:
But seriously, just use
std::vector: