摘要:
For example, suppose you'd like to write a template for fixed-size square matrices that, among other things, support matrix inversion. template<typena 阅读全文
摘要:
Suppose we need to write an application that can send messages to several different companies. Messages can be sent in either encrypted or cleartext ( 阅读全文
摘要:
Question: what is the difference between class and typename in the following template declarations? template<class T> class Widget; // uses "class" te 阅读全文
摘要:
Look what happens when we turn doProcessing from a function into a function template: void doProcessing(Widget& w) { if (w.size() > 10 && w != someNas 阅读全文
摘要:
Multiple inheritance just means inheriting from more than one base class, but it is not uncommon for MI to be found in hierarchies that have higher-le 阅读全文
摘要:
Item 32 demonstrates that C++ treats public inheritance as an is-a relationship. It does this by showing that compilers, when given a hierarchy in whi 阅读全文
摘要:
Item 32 explains that public inheritance means "is-a." Composition has a meaning, too. Actually, it has two meanings. Composition means either "has-a" 阅读全文
摘要:
Virtual functions are dynamically bound, but default parameter values are statically bound. An object’s static type is the type you declare it to have 阅读全文