12 2021 档案
摘要: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"
阅读全文
摘要:1. 赋值运算符的辨析: = 基本的赋值:= 覆盖之前的值?= 如果没有被赋值过,就赋予等号后面的值+= 添加等号后面的值 注意: make会将整个 makefile 展开后,再决定变量的值,例如: x = foo y = $(x) bar x = xyz 这个例子中,y的值将会是 xyz bar
阅读全文

浙公网安备 33010602011771号