例:
class A : public object
{
public:
A(string name);
~A();
private:
string _name;
};
class B : public A
{
public:
B(string name);
~B();
};
B-CPP
B::B(string name)
: A(string name)
{}
B::~B()
{}
例:
class A : public object
{
public:
A(string name);
~A();
private:
string _name;
};
class B : public A
{
public:
B(string name);
~B();
};
B-CPP
B::B(string name)
: A(string name)
{}
B::~B()
{}