8AB8=3  1 3 . 7 .   @8<5@,   8;;NAB@8@CNI89  @07<5I5=85  =528@BC0;L=KE  DC=:F89  
 
                             2  28@BC0;L=KE  B01;8F0E  A  :>=D;8:B><  8<5=
 
 
 
 # i n c l u d e   < s t d i o . h > 
 
 
 
 c l a s s   A { 
 
 p u b l i c : 
 
                 v i r t u a l   v o i d   f ( )   {   p r i n t f ( " A _ F \ n " ) ; } ; 
 
 } ; 
 
 
 
 c l a s s   B { 
 
 p u b l i c : 
 
                 v i r t u a l   v o i d   f ( )   {   p r i n t f ( " B _ F \ n " ) ; } ; 
 
                 v i r t u a l   v o i d   g ( )   {   p r i n t f ( " B _ G \ n " ) ; } ; 
 
 } ; 
 
 
 
 c l a s s   C : p u b l i c   A ,   p u b l i c   B   { 
 
 p u b l i c : 
 
                 v o i d   f ( ) {   p r i n t f ( " C _ F \ n " ) ; } 
 
 } 
 
 
 
 m a i n ( ) 
 
 { 
 
                 A   * a   =   n e w   A ; 
 
                 B   * b   =   n e w   B ; 
 
                 C   * c   =   n e w   C ; 
 
                 a - > f ( ) ; 
 
                 b - > f ( ) ; 
 
                 b - > g ( ) ; 
 
                 c - > f ( ) ; 
 
 } 
 
 