[ create a new paste ] login | about

Link: http://codepad.org/RnCIBBuO    [ raw code | output | fork ]

C++, pasted on Jul 16:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<iostream>
using namespace std;

class A{
public:
  void fun(){cout<<"fun\n";}
};

class B: public A{
public:
  using A::fun;
  void fun(int i){cout<<"funB\n";}
};

int main()
{
  B b;
  b.fun();
}


Output:
1
fun


Create a new paste based on this one


Comments: