Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Pointers are not ints. First off, pointers are unsigned data types. Also, on 32-bit systems, they're 32-bit unsigned longs, and on 64-bit systems, they're 64-bit unsigned long longs.

Just want to point out that "int" is not a fixed defined size in C++ either, it just has a minimum size. You equally cannot depend on the size of int or void*.



This is true in regards to the C++ spec. An int data type is up to 32-bits. For old 16-bit architectures, an int and void* are both 16 bits. For more modern architectures and compilers(anything on a 32-bit processor or higher), ints are assumed to be 32-bit signed integers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: