You can't, well not that I know of. Why don't you make 2 functions OR use templates. Look them up on google or here if you need further explanation.
Originally posted by palette
Could someone please tell me , that if I've a function that takes a void* as an argument, then, is there any way to know, exactly which type of pointer has been passed by the calling function.
void func(void* p)
// How can I know here, whether to cast p as int*, or char* to read the correct values ??