제목 : 20.1.1. 예제. 생성자 실행 순서 : 상속_실행순서.cpp
    
    
        
            
                | 
                    글번호:
                 | 
                
                 | 
                
                    167
                 | 
            
            
                | 
                    작성자:
                 | 
                
                 | 
                
                    
                        레드플러스
                        
                        
                    
                 | 
            
            
                | 
                    작성일:
                 | 
                
                 | 
                
                    
                        2005/08/19 오후 3:15:48 
                    
                 | 
            
            
            
                | 
                    조회수:
                 | 
                
                 | 
                
                    
                        4963
                    
                 | 
            
            
        
     
 
    
	
	
    
	//실행순서
#include <iostream.h>
class Parent{
public:
    //생성자
    Parent(){
        cout << "[1]Parent생성자" << endl;
    }
    //소멸자
    ~Parent(){
        cout << "[4]Parent소멸자" << endl;
    }
};
class Child : public Parent{
public:
    Child(){
        cout << "[2]Child생성자" << endl;
    }
    ~Child(){
        cout << "[3]Child소멸자" << endl;
    }
};
void main(){
    Child child;//순서?
}