Guest User

Untitled

a guest
Dec 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class A
  2. {
  3. bool a;
  4. bool b;
  5. bool c;
  6. bool d;
  7. bool e;
  8. bool f;
  9. };
  10.  
  11. bool A::get_d() {data[3];}
  12.  
  13. #include <iostream>
  14.  
  15. struct Test
  16. {
  17. bool a:1;
  18. bool b:1;
  19. bool c:1;
  20. bool d:1;
  21. bool e:1;
  22. bool f:1;
  23. bool g:1;
  24. bool h:1;
  25. //bool i:1; //would increase size to 2 bytes.
  26. };
  27.  
  28. int main()
  29. {
  30. Test t;
  31. std::cout << sizeof(t) << std::endl;
  32. return 0;
  33. }
Add Comment
Please, Sign In to add comment