/*
    Overriding1.cpp
*/

#include <iostream>

using std::endl;
using std::cout;

class AAA
{
public :
    void fct()
    {
        cout<<"AAA"<<endl;
    }
};

class BBB : public AAA
{
    void fct()
    {
        cout<<"BBB"<<endl;
    }
};

int main(void)

반응형

'C, C++, Java' 카테고리의 다른 글

Java의 정석 2장  (0) 2016.12.11
Score cut-off C++ program  (0) 2014.09.05
CReference2.cpp  (0) 2014.05.02
P304.cpp  (0) 2014.05.02
CPointer2.cpp  (0) 2014.05.02

+ Recent posts