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 |
What is the difference between malloc, calloc and realloc?
How to invoke a C function using a C++ program?
How will you print a list of all unique words from a string which may contain repeated words?
What Is A Default Constructor in C++ ?
How can you force the compiler to not generate them?
Define type casting in C++.
What is the meaning of the following declaration: int *const *const *i?
Tell us the size of a float variable.
In C++ what do you mean by Inheritance?
Find the Factorial of a number using a program.
Name the operators that cannot be overloaded.
Write a syntax and purpose of switch statement.