Need to implement one api which has some parameters;which has input's type (const void*), output's type (void**); the api wants to assign input with some offset to the output; for example,
void getOffset(const void* a, void** b)
{
int offset = getsomeoffset();
*b = a + offset;
}
This will have some complain in the compiler. What's the correct way to write this code? The input's type can be float, int, double.