首先看一段代码: 1 class B 2 { 3 public: 4 virtual void fun(int i = 1) 5 { 6 std::cout << "base fun called, " << i; 7 }; 8 }; 9 10 class D : public B 11 { 12 private: 13 virtual void fun(int i = 2) 14 { 15 std::cout << "driver fun called,