What is the difference between these two ways of writing a function in C++? Are they both "pass by reference"? By "pass by reference", I mean that the function has the ability to alter the original object (unless there is another definition, but that is my intention).
From my understanding, when you call f1, you pass in a "synonym" of the original object. When you call f2, you are passing in a pointer to the object. With the f2 call, does a new Object* get created whereas in with f1 call, nothing does?
f1 (Object& obj) {}
f2 (Object* obj) {}
Thanks!