5 ms·
Firstly, a data pointer is allowed to be a different size from a function pointer (although in most platforms they are the same size). Secondly, what he said i
by Peaker 13y ago
Firstly, a data pointer is allowed to be a different size from a function pointer (although in most platforms they are the same size).
Secondly, what he said is that pointers are not just addresses, but typed addresses that know what type they're pointing at.
- WorksOnRobots 13y agoExactly. char * a = 0; int * b = 0; a + 1 = a + sizeof(char) = 1 b + 1 = a + sizeof(int) = 4
- oscargrouch 13y ago> Secondly, what he said is that pointers are not just addresses, but typed addresses that know what type they're pointing at. Hum Ok! At first i thought he was disagreeing about pointer representing addresses; now with the way you have put it, and by reading again, i see he is adding more information to it.. thats not only address but a typed address (unless void of course).. Sorry for misunderstanding.. i want to reiterate that i agree with you "dicroce" ;)