fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Number
  5. {
  6. public:
  7. // Implicit CTOR since we didn't define one
  8. // Non initialized member
  9. int notGood;
  10. };
  11.  
  12. // isGood.notGood will be 0;
  13. Number isGood;
  14.  
  15. int main()
  16. {
  17. Number wontWork;
  18. cout << wontWork.notGood << endl;
  19. cout << isGood.notGood << endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
0
0