are pointers of integer or unsigned datatype?
+13
A:
No. They're pointers, whose size is system-dependent and whose only compatible type is void*
.
Ignacio Vazquez-Abrams
2010-10-20 09:20:32
Another compatible type is `char*`.
MSalters
2010-10-20 10:40:57
Function pointers are not compatible to `void*`.
Secure
2010-10-20 11:22:53
There has to be a compatible integer type, although which one is implementation-defined, such that you can convert a data pointer to it and back again and have the same pointer.
David Thornley
2010-10-20 13:51:13
MSalters : `char *` as a generic pointer is deprecated usage isn't it?
Noufal Ibrahim
2010-10-20 13:51:37
David : I think it's `int_ptr` which should be available on all platforms abstracting away the platform specific details.
Noufal Ibrahim
2010-10-20 13:52:40
+1
A:
Pointers are of pointer type. If you're asking about how pointer values are represented in memory, that really depends on the platform. They may be simple integral values (as in a flat memory model), or they may be structured values like a page number and an offset (for a segmented model), or they may be something else entirely.
John Bode
2010-10-20 13:42:23