According to my book there are two ways to pass arguments to a function. Call by value, and call by reference.
QUESTION: Could someone give me a precise definition of calling to me? What is calling what?
According to my book there are two ways to pass arguments to a function. Call by value, and call by reference.
QUESTION: Could someone give me a precise definition of calling to me? What is calling what?
It's actually pass by value or by reference. The function is being called regardless. It's a matter of how the argument is being passed.
Basically you're passing a number to a function, it just depends what kind of number you're passing. If you pass an int, then the function will receive the value of the int, a copy of the int, so to speak. If you pass the address of the int, then you're passing the integer by reference, and a copy of the value of the address is given. This means changes to the value that the pointer points to will be reflected in the calling function as well.
There are many examples of this.
Ahh, that's what I thought before the book confused me.