purely out of curiosity, does anyone know the size of a pointer in memory (under Windows OS)?
Printable View
purely out of curiosity, does anyone know the size of a pointer in memory (under Windows OS)?
sizeof(void*)
thanks, should have thought of that myself :o
http://www.eskimo.com/~scs/C-faq/q5.17.html
You should regard each pointer as a different type, which may have a different representation than other pointer types (and consequently, a different size).
I suppose the implication of this (given the rules for C) that a void* pointer is big enough to hold any pointer type (since assignment to void* and back again preserves information).