views:

78

answers:

1

My task is to create function funCall taking four arguments :

  • pointer for 2d array of ints that stores pairs of numbers
  • variable int maintaining number of numbers in 2d array
  • pointer for table of pointers to functions
  • int variable storing info about number of pointers to functions

I was thinking about something like this :

typedef int(*funPtr)(int, int);
funPtr arrayOfFuncPtrs[];

void funCall( *int[][]k, int a, *funPtr z, int b);
{
}
+1  A: 
typedef int(*funPtr)(int, int);

void funCall( int** array_2d, int num_of_nums, funPtr* fn_ptr_array, num_of_fn_ptrs)
{
}

like this?

Daniel
`int array_2d[][2]` would be better.
Potatoswatter