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...

Explain calling an object's member function(declared
virtual)from its constructor?

Answer Posted / deepak

It will depend on when pointer to vtable is initialised.
generally if constructor is already defined compiler insert
code to initialise virtual table pointer as first statement
inside defined constructor. If vptr is initialised before
calling virtual function then it will be invoked, if vptr is
not initialised then it can crash.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ primer good for beginners?

997


What is ios in c++?

1171


What is c++ prototype?

1094


Is map sorted c++?

957


What do you mean by const correctness?

1043


explain the reference variable in c++?

1024


What is a list c++?

1081


Why c++ is called oop?

1063


What is boyce codd normal form in c++?

1115


What are advantages of c++?

969


What is meant by entry controlled loop?

1066


Does c++ have a hash table?

952


What are the differences between the function prototype and the function defi-nition?

1052


Explain friend class?

1094


What is the use of main function in c++?

937