So passing somthing by refrence &SomeObject is the same as just passing SomeObject.
With the difrence beeing &SomeObject is "safe" since the object must be initelized?
So passing somthing by refrence &SomeObject is the same as just passing SomeObject.
No.
1. Changes to the reference are reflected in the object.
2. No copies are made.
With the difrence beeing &SomeObject is "safe" since the object must be initelized?
No. A reference may point to an uninitialized object. The reference itself is guaranteed to be initialized. In other words, a reference will point to an object, unlike a pointer, which may point to nothing.
For pedagogic reasons, you can think of references as being equivalent to pointers except:
* You use . instead of ->
* A reference can't point to invalid memory.