Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we call a virtual function from a constructor?

Answer Posted / hrpynux@gmail.com

You can call a virtual function in a constructor, but be careful. ... In a constructor, the virtual call mechanism is disabled because overriding from derived classes hasn't yet happened. Objects are constructed from the base up, “base before derived”.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know the use of vtable?

1102


Which programming language should I learn first?

1058


What is a local reference?

1158


what is graphics

2421


When do we run a shell in the unix system?

1034


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

921


What is type of 'this' pointer?

1022


What kind of problems can be solved by a namespace?

1040


What is setiosflags c++?

925


Explain friend class?

1101


Can we define a constructor as virtual in c++?

1092


What is a tuple c++?

978


What is c++ library?

1007


How do I use turbo c++?

963


What do you mean by variable?

989