why is sizeof
void pointer 2
?
The size of a void*
is a platform dependent value. Typically it's value is 4 or 8 bytes for 32 and 64 bit platforms respectively. If you are getting 2 as the value then your likely running on a 16 bit coding platform (or potentially have a coding error).
Could you post the code you are using and some more information about your environment / operating system?