fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. struct A{
  6. A(int i){}
  7.  
  8. };
  9. struct B:public A{
  10. using A::A;
  11. B(std::string b):A(1){}
  12. };
  13.  
  14. int main() {
  15. // your code goes here
  16. A a{1};
  17. B b{"test"};
  18. B bb{1};
  19. return 0;
  20. }
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
Standard output is empty