fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Test{
  5. public:
  6. Test(int x){
  7. a = 10;
  8. // b = x;
  9. }
  10. private:
  11. int a;
  12. // int b;
  13. };
  14.  
  15. int main() {
  16. // your code goes here
  17. Test a(20);
  18. cout << sizeof(a) <<endl;
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
4