Answer Posted / 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 View All Answers
Do you know the use of vtable?
Which programming language should I learn first?
What is a local reference?
what is graphics
When do we run a shell in the unix system?
What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0
What is type of 'this' pointer?
What kind of problems can be solved by a namespace?
What is setiosflags c++?
Explain friend class?
Can we define a constructor as virtual in c++?
What is a tuple c++?
What is c++ library?
How do I use turbo c++?
What do you mean by variable?