...
- A pointer to a 'foo' object has 'foo' as the unit.
- A pointer to
char *
has unit 'byte'. - Any
sizeof
oroffsetof
expression also has unit 'byte'. Wiki Markup Any variable used in an index to an array of {{foo}} objects (eg {{foo\[variable\]}}) has '{{foo}}' as the unit.
Wiki Markup |
---|
In addition to pointer arithmetic expressions, one can also hunt for array index expressions, as {{array\[index\]}} is merely shorthand for '{{array + index}}'. But programmers will likely be more conscientious about using {{[]}} with correct units than when using pointer arithmetic. |
...