Is there a way to call a base class constructor after the main code block of a subclass constructor in C++

后端 未结 0 1413
温柔的废话
温柔的废话 2021-02-07 07:59

Imagine we have the hierarchy:

class Base {
    private:
        int x;
    public:
        Base();
        Base(int x);
};

Base::Base(int x): x(x){}


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题