728  12

	 
protected	protected  	protected  	private  '
	 	 	 
	  	  	  
	   	   	   
	 	 	 
	- 	- 	- 
	 .	 .	 .
private	  	  	  
	 	 	 
	  	  	  
	 	 	 
	-	-	-
	    	    	    
	    - 	    - 	    - 
	 .	 .	 .

         ( 
     ),        
 .      ,   
 .  -      
     .

, ,     Shape:

class Shape

{

public:

void Draw(void);

};

     Circl:

class Circl : public Shape

f

public:

void Draw(void);

       Draw,     -
 

Shape *PQ1 = new Shape;

PQl->Draw();             //  Draw  Shape
Circl *PQ2 = new Circl;

PQ2->Draw();             //  Draw  Circl
PQ2->Shape::Draw();      //  Draw  Shape
((Shape *)PQ2)->Draw();  //  Draw  Shape

    ,  Draw    
.  ,        
 Circl,      .    
        (   )