##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# offsetof

From cppreference.com
< c‎ | types

Defined in header `<stddef.h>` |  |
#define offsetof(type, member) /*implementation-defined*/ |  |

The macro offsetof expands to a constant of type size_t, the value of which is the offset, in bytes, from the beginning of an object of specified type to its specified member, including padding if any.

### [edit] See also

size_t | unsigned integer type returned by the `sizeof` operator (typedef) [edit]
C++ documentation for offsetof

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/types/offsetof&oldid=56917"