C++进阶笔记
笔记20:宁以pass-by-reference-to-const替换pass-by-value
pass-by-value:bool V_student(student s);会牵扯V_student对象,会调用构造函数和析构函数,效率低
pass-by-reference-to-const:bool V_student(student& s);没有调用构造函数和析构函数,效率高
07-28
07-28
07-28