Hi everybody, me again. I finally got the concept of a function, but now we're learning how to pass an address. I have no idea how, after compiling, this program came up with the answer 5
5. I understand the first five, but I don't understand how we came up with the second 5.
/*---------------------------------------------------------*/
/* */
/* Calling a user-written function */
/* */
/* Passing an ADDRESS */
/* */
/* Compare this to 01.cc!!!! */
/* */
/*---------------------------------------------------------*/
References are pretty simple. A reference is kinda like giving something else a nickname.
If you make a change to the reference, you are simply making a change to whatever it refers to.
A reference doesn't hold anything except a memory address to what you are referencing.
Hi again JBabyJ.
When your posting code try to make it as readable as possible. The way it currently is is very difficult to work out what is going on. It's normally best to type up your code in an IDE or in something like notepad++ (which is much better for coding that normal notepad) then copy and paste the code remembering to use code tags. [code][/code]