Would I possibly have to search for the null character and count how many bytes away it is from the original pointer?
Yes, if your void*
is actually a char*
this will work.
What would I have to do to find the size of the int and float as well?
int
and float
as always the same size (it depends from your architecture, generally 32 or 64 bit. Use sizeof
operator to determine the exact size). If you are passing an array of int as void*
you haven't any way to find its length.
Generally in these cases it's convinent to pass the size to your function too.