从引用传递到设计模式
1 值传递值传递实际上是,拷贝实参的值传给形参,常用于“小对象” (small objects)int fact(int val) // factorial of val { int ret = 1; // assign ret * val to ret and decrement val while (val > 1) ret *= val--; return ret;}调用该函数:cout <...