    9:	void PutX( int xx )	{ x = xx;   }                                       
    10:	void PutY(int yy)	{ y = yy; }                                                                                                   
    11:	int GetX(void)	{ return x;  }                                         
    12:	int GetY(void)	{return y;   }                                        
    13:	friend ostream& operator(ostream& os, TPoint &p);                     
    14:	}	; 
    15:				
    16:	main()                                                                 
    17:	{ 
    18:	TPoint p;		
    19:				
    20:	 cout  p  '\n' ;
    21:	p.PutX(I00); 
    22:	p:PutY(200); 
    23:	cout  p  '\n';
    24:	return 0; 
    25:	} 
    26: 
    27:	ostream& operator(ostream& os, TPoint &p)                                                                                                   | 
    28:	{ 
    29:	  os  "x == "  p.x  ",   == "  p. ;                               
    30:	  return os; 
    31:	} 

      13    - operator()
    .  -  
  ostream&,        os  ostream&  
     TPoint. 
      operator()    TPoint,    29 
    -    ,   
  .  ,       
  ,    os  ostream   
-    .   ,   
 os.        :	

     == 0,   == 0  == 100,   == 200 

      operator()    ostream,   
       . ,  p1, 2  
    TPoint,       : 

    cout  1  ";   "  2  ";   "  ; 

              
,      .   
    : 

    ((((cout  1)  ";   ")  2)  ";   ")  ; 

        ,        ? 
    
         

            ,    
  C++     .   15.9  
 - POINTOUT.CPP     
   . 

     15.9.  POINTIN.CPP (   ) 

    1:	#include <iostream.h> 
    2: 
    3:	class TPoint { 
    4:	private:	
    5:	   int x, y; 
    6:	public: 
    7:	  TPoint() { x =  = 0; } 
    8:	 TPoint(int xx, int yy)	{  = ;  = ; } 
    9:	  void PutX(int xx) { x =	; }     
    10:	  void PutY(int yy) {  =	; }   
    11:	  int GetX(void) { return	XI }             
    12:	  int GetY(void) { return	; }              
    13:	  friend ostreamS operator(ostream& os, TPoint &p); 
    14:	  friend istream& operator(istream& is, TPoint &p); 
    15:	}; 
    16: 
    17:	main() 


    388      III.   ANSI C++ 
