Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

& Address-Of Operator

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

Syntax:

&field-id

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
};