basics of inheritance - part 2
invoking method of a base class in a derived class Typically, if your specialized implementations in derived class need to re...
invoking method of a base class in a derived class Typically, if your specialized implementations in derived class need to re...
C++ syntax of derivation 1234class base{ //...base class members} 1234class Derived: access-specifier Base{...
using aggregate initialization on classes and structs aggregate initialization syntax 1Type objectName = {argument1,...,...
sizeof() a char* pointer's size is fixed at 4 bytes (on 32-bit system, and double it on 64-bit) and is independent of the vol...
move constructor 123456789class MyString{ // pick implementation from Listing 9.9};MyString Copy(MyString& sour...
the difference of & used in reference and store address A reference & is a alias of variable and must be initialized ...
strlen vs sizeof strlen method is used to find the length of an array whereas sizeof method is used to find the actual size ...
return用来退出当前函数模块。 注意有返回值,即:return (num) 中(num)是某个返回值,则调用函数的时候可以赋值,比如如果返回是int类型可以这样赋值urnum=MyFunction(factor);,如果没有返回值则直接调用该函...