问题 单项选择题

下列关于虚基类的叙述中,错误的是

A.使用虚基类可以消除由多继承产生的二义性

B.构造派生类对象时,虚基类的构造函数只被调用一次

C.声明“class B:virtual public A”说明类B为虚基类

D.建立派生类对象时,首先调用虚基类的函数

答案

参考答案:C

解析: 使用虚基类的目的就是为了解决多继承路径下对基类成员的访问的二义性问题。一旦继承虚基类,那么在构造派生类对象时,虚基类构造函数就只调用一次。派生类对象调用构造函数和普通类对象一样,都是先调用基类构造函数,然后调用派生类构造函数。

完形填空
完形填空。
     My mother let go of me when I could not let go of her .In one last brave moment she was strong for
me ,thus making me strong ,too.
     I was in the kitchen when    1  called and told me to make a quick decision .They could only hold a
place for my   2  until the next morning.
     The thought of being   3  from my Alzheimer's stricken (早老性痴呆)mother when she needed me
most   4  me .Dad died when I was a teenager ,Mom and I had   5  many hard times together .Mom
taught me to laugh my way through bad experiences and sing through   6  days .But in recent years ,
except for extremely   7  moments of consciousness , she'd become lost in her own private world .I
knew that   Mom needed    8  nursing and medical care ,yet the possibility of a complete stranger
coming to her at night ,when she would   9  around like a sleepwalking child ,filled me with a feeling of 
  10  .
     Two bitter days passed   11  we left for the nursing home .I hugged and kissed her with  12  tears,
I'd always planned the best golden years for Mom in her old age ,but now I was saying  13 .
     Suddenly there was something shining in her   14 ,a look of recognition ."Stop crying now",she said
firmly ,"Say goodbye and get going .Don't   15 about me ."
     I stood with   16  and stared into her face ."Mom!"I cried and reached out for her .But as quickly
as my "real "Mom had appeared ,she   17  again into her world of a little child   18 ,at that very moment
I realized the mother ,that familiar Mom who knew and understood ,who   19   and sang with me in hard
times ,would always be there ,giving me   20  when I needed it most .
( )1. A. the hospital
( )2. A. Dad          
( )3. A. freed        
( )4. A. relaxed      
( )5. A. braved      
( )6. A. unforgettable
( )7. A. regular      
( )8. A. casual      
( )9. A. wander      
( )10. A. love        
( )11. A. before      
( )12. A. happy      
( )13. A. hello      
( )14. A. hands      
( )15. A. worry      
( )16. A. satisfaction
( )17. A. disappeared
( )18. A. Meanwhile  
( )19. A. laughed    
( )20. A. confidence  
B. the nursing home
B. Mom              
B. protected        
B. comforted        
B. feared          
B. comfortable      
B. rare            
B. limited          
B. dream            
B. sacrifice        
B. after            
B. helpless        
B. goodnight        
B. mind            
B. wonder          
B. disappointment  
B. broke            
B. Therefore        
B. cried            
B. strength        
C. the kindergarten
C. brother      
C. forbidden    
C. pained      
C. escaped      
C. smooth      
C. usual        
C. professional    
C. sleep       
C. warmth      
C. until        
C. thankful    
C. goodbye      
C. voice        
C. puzzle      
C. amazement      
C. returned       
C. Besides      
C. talked      
C. safety      
D. the school    
D. husband      
D. separated    
D. struck        
D. followed      
D. tough        
D. common        
D. general      
D. look          
D. shame        
D. since        
D. salty        
D. thanks        
D. eyes          
D. hesitate      
D. recognition  
D. left          
D. However      
D. cooked        
D. relief        
单项选择题