M
M Turo
Hi,
I was wondering if anyone can help. I'm want to pre-load a 'table' of
function pointers that I can call using a its arrayed index, eg (non c
code example)
pFunc[0] = func_A;
pFunc[1] = func_B;
.
.
pFunc[n] = func_x
So I tried to create the function pointer array (after reading about
function pointers in a tutorial) with:
(*ptr_func)(unsigned char)[10];
And
(*ptr_func)[10](unsigned char);
But just get compiler errors.
I thought pointers were typically the same size as an int so that I
could assign my func pointers to an int array, but then, I wondered,
what about the parameter list.
Anyone willing to help me see the light?
Regards,
Mark.
I was wondering if anyone can help. I'm want to pre-load a 'table' of
function pointers that I can call using a its arrayed index, eg (non c
code example)
pFunc[0] = func_A;
pFunc[1] = func_B;
.
.
pFunc[n] = func_x
So I tried to create the function pointer array (after reading about
function pointers in a tutorial) with:
(*ptr_func)(unsigned char)[10];
And
(*ptr_func)[10](unsigned char);
But just get compiler errors.
I thought pointers were typically the same size as an int so that I
could assign my func pointers to an int array, but then, I wondered,
what about the parameter list.
Anyone willing to help me see the light?
Regards,
Mark.