fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Foo {
  5. Foo(const char *s) { cout << "Init " << s << endl; }
  6. };
  7. struct Bar {
  8. Foo a;
  9. Foo b;
  10. Foo c;
  11. Bar() : c("c"), b("b"), a("a") {
  12. }
  13. };
  14.  
  15. int main() {
  16. Bar b;
  17. return 0;
  18. }
Success #stdin #stdout 0s 4404KB
stdin
Standard input is empty
stdout
Init a
Init b
Init c