why do we need virtual methods in C++?
2015-04-18 16:06
447 查看
http://stackoverflow.com/questions/2391679/why-do-we-need-virtual-methods-in-c
Basic idea: when mark a method as virtual in a parent class, the compiler will check the method in the child class firstly.
Basic idea: when mark a method as virtual in a parent class, the compiler will check the method in the child class firstly.
相关文章推荐
- Why do we need extern “C”{ #include <foo.h> } in C++?
- Covariance and Contravariance in C# Part Seven: Why Do We Need A Syntax At All?
- why do we need root and logger in log4j.xml
- Why do we need Lambda in Java?
- Why do we need managed accounts in SharePoint 2010
- Programming Basic--why we need to add ' extern "C" ' in C++ program when calling the function which is complied by C complier?
- why do you need ./ to execute programs in current directory?
- Why do we need another Big data processing engine, like SPARK ?
- Thought Bubbles - Why do we need symbolic links?
- Why do people use enums in C++ as constants while they can use const?
- Why do we need all this SGML stuff? Why not jus...
- Why we need interfaces in Delphi
- Why do we need the copy-and-swap idiom?
- Why do we need smart pointer and how to implement it.
- Why can't we change access modifier while overriding methods in C#?
- When do we use Initializer List in C++?
- why we need virtual key word
- Why do we live in this world?
- Why we need interfaces in Delphi
- Some knowledge about why we need to new and delete everything in one module