Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A
- {
- bool a;
- bool b;
- bool c;
- bool d;
- bool e;
- bool f;
- };
- bool A::get_d() {data[3];}
- #include <iostream>
- struct Test
- {
- bool a:1;
- bool b:1;
- bool c:1;
- bool d:1;
- bool e:1;
- bool f:1;
- bool g:1;
- bool h:1;
- //bool i:1; //would increase size to 2 bytes.
- };
- int main()
- {
- Test t;
- std::cout << sizeof(t) << std::endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment