I recently installed a 64bit OS on my computer, I thought that sizeof(char*) would give me 8 instead of 4. Shouldn’t I get a 64 bit addresses in my pointers?
I recently installed a 64bit OS on my computer, I thought that sizeof(char*) would
Share
This is because the compiler you are using is emitting 32 bit code. If you use a 64 bit compiler then pointers will be 8 bytes wide.
Note that most 64 bit systems have the ability to run 32 bit code under an emulation layer. On Windows the emulation layer is known as WOW64. This is clearly what is happening here.