79725599

Date: 2025-08-05 04:33:34
Score: 4.5
Natty:
Report link

Thank you @ChristianStieber I had completely missed that I was using a constructor with parameters for the default constructor. :(

class A {
public:
    A() : obj(nullptr) {}
    A(int*& obj_) : obj(obj_) {}

protected:
    int* obj;
};

class B : public A {
public:
    B() : A() {}
    B(int*& obj_) : A(obj_) {}
};
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): :(
  • Has code block (-0.5):
  • User mentioned (1): @ChristianStieber
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: BalmyWinner