Dec 8, 2008 at 9:34am UTC
To put it simply, I want to change the following,
void (*function[8])();
to
void (*(*players_ptr))();
and dynamically allocate an array of function pointers.
Dec 8, 2008 at 9:48am UTC
There are extra parentheses in there:
void (**players_ptr)()=new void (*)()[8]
Last edited on Dec 8, 2008 at 9:49am UTC
Dec 8, 2008 at 9:54am UTC
'new' : cannot allocate 'void' objects
Dec 8, 2008 at 5:27pm UTC
Yeah, that seems like the simplest way. I also got it to work like this:
void (**players_ptr)()=(void (**)())malloc(sizeof (void *)*8);
Last edited on Dec 8, 2008 at 5:28pm UTC
Dec 9, 2008 at 5:43am UTC
Thanks guys, worked great.