Is it possible to pass variable type as part of a function parameter, e.g.:
void foo(varType type) { // Cast to global static unsigned char bar; bar =
You could make an enum for all different types possible, and use a switch to make the dereferencing:
typedef enum { CHAR, INT, FLOAT, DOUBLE } TYPE; void foo(TYPE t, void* x){ switch(t){ case CHAR: (char*)x; break; case INT: (int*)x; break; ... } }