I have a question about how the arguments are copied to a function and how the return value is copied out of the function:
Say that you have two classes, A and B, and a function func:
and som more codeCode:B func(A arg) { B ret; return ret: }
Now, when in is sent to func, it is copied to arg, but how is it copied? Is it done like A arg; arg = in; or like A arg(in);? Or in some other way? And what object is operated on when the print function is called, and how is that object created; is it a copy of ret or is it the ret object itself (before it is destroyed)?Code:A in; func(A).print(); //Suppose B contains a print funtion