10.4.  ___________________________________289

  ,  :

int comp(p_gen i, p_gen j)
{

return (strcmp(static_cast<char*>(i),
static_cast<char*>(j) .)) ;

}

 ,    print ()    
s_tree : : print ()   ;     -
 ,    .

void print(bnode* n)
i

cout  static_cast<char*>(n -> data)  '\t' ;

cout  n -> count  '\t';

}

,  ,      
,      gen_tree   
 p_gen.

        .  ,
       , -
   .       -
,   .      
,       .  
,  ,  ,   
  .        . -
,        .

10.4.  

 -      ,
         
.           -
  .   ,     ( -
 )   -   
  .   virtual   ,
      ,      -
   -.     -
          -
  .     .

       .
      ,     .  
    (, ),   -
       ,   -
.  ,       ,
  (  ).      -
    ,     