Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Blah{
- char c;
- int a;
- };
- int main()
- {
- Blah b[100];
- std::cout << offsetof(Blah, c) << std::endl;
- std::cout << offsetof(Blah, a) << std::endl;
- std::cout << sizeof(Blah) << std::endl;
- std::cout << &b[0] << std::endl;
- std::cout << &b[1] << std::endl;
- }
- ---------
- Output:
- 0
- 4
- 8
- 00EFFAB0
- 00EFFAB8
Advertisement
Add Comment
Please, Sign In to add comment