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?



Can we call a virtual function from a constructor?..

Answer / 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

More C++ Interview Questions

What does it mean to take the address of a reference?

0 Answers   Amazon,


How can you force the compiler to not generate them?

0 Answers   Amazon,


How do you work around them?

0 Answers   Amazon,


What is a virtual function in C++?

0 Answers   C DAC,


Describe the different styles of function prototypes in C++.

0 Answers   Adobe,


What is wrong with this statement? std::auto_ptr ptr(new char[10]);

0 Answers   Amazon,


Define namespace.

1 Answers  


What does it mean to declare a member function as static in C++?

0 Answers   Amazon,


Difference between function overloading and function overriding.

0 Answers   Alter,


Write a C++ Program to Find Sum and Average of three numbers.

1 Answers  


Do you know about Agilent PRECOMPILERS. ?

0 Answers   Agilent,


Write a syntax and purpose of switch statement.

0 Answers   Agilent,


Categories