Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   base class member init in derived class (http://www.velocityreviews.com/forums/t600858-base-class-member-init-in-derived-class.html)

Chris Forone 03-22-2008 08:12 AM

base class member init in derived class
 
hello group,

i have a base class with a std::vector in protected area. is it possible
to call an explizit ctor in derived class ctor initialization list?

thanks & hand, chris

Ian Collins 03-22-2008 08:20 AM

Re: base class member init in derived class
 
Chris Forone wrote:
> hello group,
>
> i have a base class with a std::vector in protected area. is it possible
> to call an explizit ctor in derived class ctor initialization list?
>

No, the only place you can initialise a base class member in an
initialisation list is in a base class constructor.

--
Ian Collins.

Chris Forone 03-22-2008 08:45 AM

Re: base class member init in derived class
 
Ian Collins schrieb:
> Chris Forone wrote:
>> hello group,
>>
>> i have a base class with a std::vector in protected area. is it possible
>> to call an explizit ctor in derived class ctor initialization list?
>>

> No, the only place you can initialise a base class member in an
> initialisation list is in a base class constructor.
>

Thanks a lot, chris


All times are GMT. The time now is 07:22 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.