[ create a new paste ] login | about

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

C++, pasted on Nov 6:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <cstdio>

class A
{
public:
    virtual void B() { std::puts(__PRETTY_FUNCTION__); }
    void C() { B(); }
};

class exA : public A
{
public:
    void B() { std::puts(__PRETTY_FUNCTION__); }
};

int main()
{
    exA ex;
    ex.C();
}


Output:
1
virtual void exA::B()


Create a new paste based on this one


Comments: