Well, a void* pointer can be assigned to either type. Here's an example of what you could do, if I've understood your situation properly. If not, post more code.
Code:
#include <stdio.h>
typedef void (*print_t)(void *array, int elements);
void print_int(void *array, int elements) {
int *data = array;
int x;
for(x = 0; x < elements; x ++) {
printf("%d", data[x]);
if(x + 1 < elements) printf(" ");
}
printf("\n");
}
void print_int_int3(void *array, int elements) {
int (*data)[3] = array;
int x, y;
for(x = 0; x < elements; x ++) {
for(y = 0; y < 3; y ++) {
printf("%d", data[x][0]);
if(y + 1 < 3) printf(" ");
}
printf("\n");
}
}
int main() {
int array[] = {1, 2, 3, 4, 5};
int positions[][3] = {{1, 1, 1}, {2, 3, 4}, {-1, 5, -16}};
print_t func1 = &print_int;
print_t func2 = &print_int_int3;
printf("Normal array:\n");
(*func1)(array, sizeof(array) / sizeof(*array));
printf("Array of 3D positions:\n");
(*func2)(positions, sizeof(positions) / sizeof(*positions));
return 0;
}
Okay, that's pretty terrible code, but I think you get what I'm try to demonstrate . . . .