Question OOP-POLY-0069
HardWhy can't a C++ constructor be virtual?
- A.
C++ forbids all virtual functions
- B.
The object's dynamic type (and vtable) isn't set up until construction runs
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Polymorphism question
Why can't a C++ constructor be virtual?
C++ forbids all virtual functions
The object's dynamic type (and vtable) isn't set up until construction runs
Sign up free to see the answer and a step-by-step explanation.
Constructors have no names
It would be slower