http://www.parashift.com/c++-faq/virtual-functions.html
On Wed, Oct 10, 2012 at 2:16 AM, rahul sharma rahul23111...@gmail.comwrote:
Guys i have read that concept of virtual fxn is not applicable in case of
constructors..I means using virtual function in constructors always call
local
FYI ..
http://www.artima.com/cppsource/nevercall.html
If you read the VTABLE and and how virtual function is implemented then
you understand automatically why virtual is not applicable in constructor
case .
One more request its algo-group please try to avoid out of the topic
questions .
In short: Call for virtual function in constructor is redirected to the
local function because, the derived part of the object has not being
initialized yet(remember you are still in Bases' constructor) and it makes
no sense to call a derived's implementation of a virtual function, which in
turn
@vishal...i know its algo group..i was not getting exact answer..so
posted...hope it will also help someone.
On Wed, Oct 10, 2012 at 9:53 AM, Saurabh Kumar srbh.ku...@gmail.com wrote:
In short: Call for virtual function in constructor is redirected to the
local function because, the
Guys i have read that concept of virtual fxn is not applicable in case of
constructors..I means using virtual function in constructors always call
local function..i wan to read more on this..can nybody explain use of
virtual functions in constructor or provide me with a link for this..
thnx
--