A
method is a member
function of a class, but in
C++ they are more commonly called member
functions than
methods (some programmers coming from other languages like Java call them
methods). A
function is usually meant to mean a free-
function, which is not the member of a class.
Dec 22, 2011');})();(function(){window.jsl.dh('10','
');})();(function(){window.jsl.dh('_DlGcYM3zDJet0PEPyNu9sAc47','
');})();(function(){window.jsl.dh('12','
Inside the function, the reference is used to access the actual argument used in the call. This means that changes made to the parameter affect the argument. By default, C++ uses call by value to pass arguments.