fork(1) download
  1. #include <iostream>
  2.  
  3. class A
  4. {
  5. public:
  6. A(int v) : value(v) { }
  7.  
  8. int value;
  9. };
  10.  
  11. class B : public A
  12. {
  13. public:
  14. using A::A;
  15. };
  16.  
  17. int main() {
  18. B b = B(1);
  19. std::cout << b.value << std::endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
1