C++:关于函数调用时的argument passing是by reference还是by value

来源:互联网 发布:手机查询淘宝信誉级别 编辑:程序博客网 时间:2024/04/29 18:15

2014.2

根据C++ primer 5th edition 6.2节,有个关键理解:

When the argument value is "passed by value", the argument value is "copied", the parameter and argument are "independent";


when argument is "passed by reference", the parameter is an alias for its corresponding argument. 

0 0