제목 : 19.5.1 예제. this 키워드 : 자기 참조 포인터
    
    
        
            
                | 
                    글번호:
                 | 
                
                 | 
                
                    294
                 | 
            
            
                | 
                    작성자:
                 | 
                
                 | 
                
                    
                        레드플러스
                        
                        
                    
                 | 
            
            
                | 
                    작성일:
                 | 
                
                 | 
                
                    
                        2007/01/19 오후 5:22:40 
                    
                 | 
            
            
            
                | 
                    조회수:
                 | 
                
                 | 
                
                    
                        4989
                    
                 | 
            
            
        
     
 
    
	
	
    
	// this : 자기 참조 포인터 : 자기 자신의 클래스의 인스턴스를 나타냄...
#include <iostream>
using std::cout;
using std::endl;
class Car
{
private:
    char* color; // 필드 color
public:
    Car(char* color) // 매개변수 color
    {
        this->color = color;            
    }
    void Print()
    {
        cout << color << "(" << this->color << ")" << endl;
    }
};
void main()
{
    Car c("Red");
    c.Print();
}