    18:	{ 
    19:	TPoint p; 
    20: 
    21:	cout  p  An'; 
    22:	p.PutX(I00); 
    23:	p.PutY(200); 
    24:	cout  p  '\n'; 
    25:	cout  "\nEnter x and  values: "; 
    26:	cin  p; 
    27:	cout  "\n You entered: "  p; 
    28:	return 0; 
    29:	} 
    30: 
    31:	ost ream& operator(ostream& os, TPoint &p) 
    32:	{ 
    33:	  os  "x == "  p.x  ",   == "  p.; 
    34:	  return os; 
    35:	} 
    36: 
    37:	istreamA operator(istream& is, TPoint &p) 
    38:	{ 
    39:	  is  p.x  p.y; 
    40:	  return is; 
    41:	}
 
      14   TPoint   -  
  operator(),       
,    ,   ostream  istream. 
       ( 37-41)         
 is  istream.    is,    
      . 
               . 
   ,  .    
   26        , 
     27. 

     

            
 ,    c    
   .      , 
   . ,    
 ,       , 
    . 

      

         ,   
 .  ,     
,    : 

    template<class T> void f(T param) 
    { 
       //   
    } 

        template<class >,  
,       . (  
     ,  .) ,   , 
        .    
  (* param)   (& param).    
      : 

    template<class >  f(int ,  b) { 
           //   
    } 

         f()        
     a       b. 
       . ,   
   : 

    double f(int a, double b); 

       ,     . , 
 f()   ,    ,    
   double. 


    15.   C++     389 
