3 ms·
Well there’s a little bit more to it. There is a type involved, and then there’s pointer arithmetic.
by Koshkin 4y ago
Well there’s a little bit more to it. There is a type involved, and then there’s pointer arithmetic.
- Sohcahtoa82 4y agoWell yes, but those aren't hard. Pointer arithmetic is merely knowing that any addition/subtraction done to a pointer is multiplied by the size of the type being pointed to. So if you're pointing to a 64-byte struct, then "ptr++;" adds 64 to the pointer.
- int_19h 4y agoTyped pointers interact with aliasing in "interesting" ways.