If I have an object 'Hotel' which has a few set properties and I pass it to another object which populates more of its properties and then releases it will the first class see these values?
A:
Yes, that will work. But the object isn't passed by reference; rather, you're passing a pointer to the object, which means the caller and the callee both have pointers to the same object; thus, if you use a mutator to modify the object's properties, both the caller and the callee will see the changes.
mipadi
2010-08-24 15:18:13
Great thank you
TheLearner
2010-08-24 15:23:33