Comment
Comment by AnthonyMouse
So to summarize, you have a Java function:
Which is the equivalent C++ function?
It's the last one. Java passes everything by value, but non-primitive objects in Java are actually pointers (which Java inaccurately calls references), and the pointer is passed by value.