Advertisement
ankhe

memory.cpp

Dec 10th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class X {
  4.  private:
  5.   bool b;
  6.   uint32_t ui;
  7. };
  8.  
  9. int main() {
  10.   std::cout << sizeof(bool) << std::endl; // 1
  11.   std::cout << sizeof(uint32_t) << std::endl; // 4
  12.   std::cout << sizeof(X) << std::endl; // 8
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement