Q:

Can we have a virtual constructor in C++?

0

Can we have a virtual constructor in C++?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

The Constructor can’t be virtual as the constructor is a code that is responsible for creating an instance of a class and it can’t be delegated to any other object by virtual keyword means.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions For Experienced

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Can you change ‘this pointer’ of an object to ... >>
<< When to use virtual destructors in c++?...