A simple question for which I want to find the answer here.
“As parameters to a function, class objects can be passed by reference only.”
void myRefFunction(type myRefVariable)
For a simple data types like
float, etc. a function is called by value.
myRefVariable is the array, only a starting address is passed (even though the function is the call by value function).
myRefVariable is the object, also only a address of a object is passed rather than creating the copy and passing it.
So question is does C++ pass the object by reference or value?