Can we call a virtual function from a constructor?
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 |
Difference between Call by pointer and by reference.
Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69
What Is Polymorphism in C++ ?
2 Answers IBS, Impetus, ITC Indian Tobacco Company, Motorola,
What is the purpose of a constructor? Destructor?
Write a C++ Program to Display Number (Entered by the User).
What are "pure virtual" functions?
0 Answers Adobe, Alter, iNautix,
When must you use a constructor initializer list?
How to convert integer to string in C++
How to run C++ program in cmd
What are the different scope C++ provide ?
If class D is derived from a base class B
Execute the qsort () in c/sort() in c++ library or your own custom sort which will sort any type of data on user defined criteria.