In a pass by reference function, if I keep calling it inside a while loop and want a value returned do I have to say return variable for everything I want returned ?
In a pass by reference function, if I keep calling it inside a while loop and want a value returned do I have to say return variable for everything I want returned ?
I don't understand what you are trying to say here. Please give an example.
is this function prototype correct or can't be done in c++?
Variable is a name for a memory location. When a function introduces a variable, it reserves memory. If it then passes a reference to another function, the called function will modify the memory location of the calling function.
If you call a function several times, in loop for example, each call in turn has the chance to do something.