2009/9/22 Henri Verbeet <hverb...@gmail.com>: > "s->pointer" refers to the value of the pointer if "pointer" is a > pointer, but to the address of the first array element if "pointer" is > an array. I.e. "&s->pointer[0]" as Nicolas posted. > To clarify a bit more, if it's an array the actual array elements are stored in the structure, so &s->pointer[0] is just the offset of the field in the array, but if it's a pointer just the address of whatever the pointer points to is stored in the structure, so you have to dereference the pointer to the structure to get to it.
- Re: cppcheck sept 18 redux Ben Klein
- Re: cppcheck sept 18 redux Vitaliy Margolen
- Re: cppcheck sept 18 redux Henri Verbeet
- Re: cppcheck sept 18 redux Vitaliy Margolen
- Re: cppcheck sept 18 redux Ben Klein
- Re: cppcheck sept 18 redux Luke Benstead
- Re: cppcheck sept 18 redux Nicolas Le Cam
- Re: cppcheck sept 18 redux Ben Klein
- Re: cppcheck sept 18 redux Luke Benstead
- Re: cppcheck sept 18 redux Henri Verbeet
- Re: cppcheck sept 18 redux Henri Verbeet
- Re: cppcheck sept 18 redux Mike Kaplinskiy
- Re: cppcheck sept 18 redux Ove Kaaven
- Re: cppcheck sept 18 redux Chris Robinson
- Re: cppcheck sept 18 redux Ben Klein
- Re: cppcheck sept 18 redux Chris Robinson
- Re: cppcheck sept 18 redux Henri Verbeet
- Re: cppcheck sept 18 redux Ove Kaaven
- Re: cppcheck sept 18 redux Detlef Riekenberg
- Re: cppcheck sept 18 redux David Laight