Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Just like in the title, how do you call a base class copy constructor from a derived class copy constructor?
您可以在初始化列表中指定基本初始化:
Derived:: Derived( const Derived& other ): Base( other ) { /* ... */ }
Derived( Derived const& d ) : Base(d) /* some member initialization */ { /* ... */ }
我错过了什么吗?