Using:
1. introducing namespaces in the current file
???? using namespace Std;
2. using a using declaration in a subclass to introduce a base class member name (see C + + primer)
???? concrete Function embodies :
???? (1). Remove member protection or privatization restrictions due to inheritance introduce a base class member into the corresponding access control area of the derived class
???? Class Base {
???? Private:
???????? std::size_t size () const { return N;}
???? Protected:
???????? std::size_t N;
????};
???? Class Derive: private Base {
???? Public :
???????? using base:size;???????????? // user and in-class access
???? Protected:
???????? using base:n;???????????????? // in-class access
????};
???? (1). derived class to reload base class members ( normal , If the derived class requires overloading, you need to override the base class function for each derived class
???? class Base {
???? Public:
???????? std::size_t size () const { return 1;}
???????? std::size_t size (int n) const { return N;}
????};
???? Class Derive: public Base {
???? Public :
???????? using Base : size;???????????????????? // Get the base class all overloaded versions of this function
???????? std::size_t size (float N) Const { return N }????????????
????};
C + + fundamentals (using)