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

What is the difference between #import and #include?

1060


What is static variable and difference between(const char *p,char const *p,const char* const p).

1109


What can c++ be used for?

1105


When should overload new operator on a global basis or a class basis?

1083


Why do pointers exist?

1104


What data encapsulation is in c++?

1161


Describe linkages and types of linkages?

998


Can we use clrscr in c++?

1082


What is data abstraction? How is it different from data encapsulation?

1006


Is html an oop?

1079


How can we check whether the contents of two structure variables are same or not?

1079


Differentiate between late binding and early binding.

1282


If class D is derived from a base class B

776


What is a null tree?

1143


Explain the different access specifiers for the class member in c++.

1014