Class and Object oriented:
Display interface (explicit interface): that is, visible in the source code, you can see all the interfaces of the class in the header file;
Run-time polymorphism (Runtime polymorphism): A member function is virtual, when a reference or pointer to a class is passed, the interface is automatically matched at run time, possibly the interface of a base class, or a derived class;
Template (templates) and generic programming (generic programming):
Implicit interface (implicit interface): TypeName T, in a function, must support a set of operations, only to support these operations in order to compile;
Compile-time polymorphism (Compile-time polymorphism): a template (template)-instantiated (instantiated) function template (function templates), similar to overloads, is bound at compile time.
In an implicit interface, overloads, such as operators, already contain implicit type conversions.
If the program can be compiled, whether it is a class or a template, you need to pass through polymorphism to meet the requirements of the interface, otherwise can not be compiled.
Author: csdn Blog spike_king
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/cplus/