虚基类 在说明其作用前先看一段代码 class A{public: int iValue;}; class B:public A{public: void bPrintf(){cout<<"This is class B"<<endl;};}; class C:public A{public: void cPrintf(){cout<<"This is class C"<<endl;};}
纯函数的定义,非常重要!! Pure function 意指相同的输入,永远会得到相同的输出,而且没有任何显著的副作用. 老样子,我们还是从最简单的栗子开始: var minimum = 21; var OutercompareNumber = function(number) { return number > minimum; } 以及 var InnercompareNumber = function(number) { var minimum = 21; return number >