therefore, there are two ways to pass the class object (this is what you are asking) as an argument to the function i) Either pass a copy of the object to the function, so if any change made by the function in the object is not reflected in the original object
ii) Pass the base address of the object as an argument to the function. In the thsi method, if there are any changes made to the object by the calling function, they will also be reflected in the orignal object.
for example, look at this link , it clearly demonstrates the use of a pass by value and the passage through the link, the answer is clearly demonstrated in Jim Brissom.
source share