sizeof void pointer

alfesani picture alfesani · Oct 4, 2010 · Viewed 57.8k times · Source

why is sizeof void pointer 2 ?

Answer

JaredPar picture JaredPar · Oct 4, 2010

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?