fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. struct A{
  6. A(int r){
  7. printf("Конструктор A(%d) %llx\n",r,this);}
  8. };
  9.  
  10. struct B:A{
  11. B():A(124){
  12. printf("Конструктор B %llx\n",this);
  13.  
  14. }
  15.  
  16. };
  17.  
  18. int main() {
  19. B test;
  20. return 0;
  21. }
Success #stdin #stdout 0s 4524KB
stdin
Standard input is empty
stdout
Конструктор A(124) 7ffe679ed927
Конструктор B 7ffe679ed927