How define an array of function pointers in C - Stack Overflow

How define an array of function pointers in C - Stack Overflow

瀏覽:1298
日期:2024-07-12
You'd declare an array of function pointers as T (*afp[N])(); for some type T. Since you're dynamically allocating the array, you'd do something like T (**pfp)() = calloc(num_elements, sizeof *pfp); or T (**pfp)() = malloc(num_elements * sizeof *pfp); You...看更多