#include "stdafx.h" #include <iostream> #include <algorithm> using namespace std; class Base { public: int num; virtual void func() { cout<<"Do something in Base"<<endl; } }; class Derived:private Base { public:
#include <iostream> class A { public: void func() { std::cout << "Hello" << std::endl; } void func(int k) { } }; class B : public A { public: using A::func; // 把这句注释掉试试,嘿嘿 void func(int i) { } }; int main() { B b; b.func();//编译