fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Yoba1 {
  5. int i;
  6. };
  7.  
  8. struct Yoba2 {
  9. int i;
  10. int& j = i;
  11. };
  12.  
  13. int main() {
  14. std::cout << sizeof(int*) << std::endl;
  15. std::cout << sizeof(Yoba1) << std::endl;
  16. std::cout << sizeof(Yoba2) << std::endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
4
4
8