热门摘录
For global objects, the constructor is called when the program begins execution, prior to the call to main( ).
An inline function is a small function whose code is expanded in line rather than called. The reason for inline functions is efficiency.
It is important to understand that technically, inline is a request, not a command, that the compiler generate inline code.
As you can see, the keyword friend precedes the rest of the prototype. A function may be a friend of more than one class.
Finally, except for the function call operator (discussed later), operator functions cannot have default arguments.
In all cases, the private elements of the base class remain private to that class, and are not accessible by members of the derived class.
In all cases, private members of a base class remain private to the base class, and are not inherited.
The inheritance of a base class as virtual ensures that only one copy of it will be present in any derived class.
The difference between a normal base class and a virtual one becomes evident only when an object inherits the base class more than once.
“one interface, multiple methods.”
Because of the restrictions and differences between overloading normal functions and redefining virtual functions, the term overriding is used to describe the redefinition of a virtual function.
virtual type func-name(parameter-list) = 0;
C++捷径教程(第3版)书评
还没人写过点评,快来抢沙发吧