Device Monitoring Studio - Monitor, log and analyze data coming through PC ports and connections
Download Device Monitoring Studio Hide this button

& Address-Of Operator

This operator takes the address (offset) of the given field.



Returned address is absolute.

struct A
    int a;
    int b;
    const OffsetTob = &b - this;    // offset to field b (in bytes) from the beginning of the 
                                    // structure is now stored in OffsetTob constant