Quantcast
Channel: ArduCopter - ArduPilot Discourse
Viewing all articles
Browse latest Browse all 21350

How can I understand the below code

$
0
0

@King5 wrote:

I have some puzzle with the code below:

#define AP_VAROFFSET(type, element) (((ptrdiff_t)(&((const type *)1)->element))-1)

define here

question:
is that want to using the class type and variable name to find out the address of the var in the class?
but a class type would not has the variable define only if the class is defined to a object.

so,I has a test on linux, and the result is : 0xfffffffffffffffd

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 21350

Trending Articles