I am currently trying to understand OOP in C++.
I want to know how to pass references of temporary object arguments to functions.
I have an example with 3 ideas of how to do this:
I would prefer the first way to do it if that syntax is legal and if I get what I want. Next option would be the second idea to first create a local object.
I do not like the third idea, since I am using operator 'new' and I do not want to allocate unnecessary memory on the Heap. I only want it to be stored as a global variable in the Global Variables memory section.