fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct noisy
  5. {
  6. noisy() { std::cout << "noisy default constructor\n"; }
  7. };
  8.  
  9. struct holder
  10. {
  11. noisy n;
  12. holder(){}
  13. };
  14.  
  15. int main()
  16. {
  17. holder h;
  18. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
noisy default constructor