Originally Posted by
iMalc
Are you coming from a C# background, or some other language?
For things like this where you clearly have some idea about how these things may work, we can probably help better if we can relate C++ to whatever other language you are familiar with.
I haven't been programming for 4 years. The language I am thinking off when I wrote the question was c pointers. I can visualize c pointers as follows:
Code:
int x=0;
int *y=&x;
int z=0;
x++;
z=*y;
x is an address location with value 0. The pointer of Y points to address of x. The value of the pointer y is 0. Let z equals to the value of the pointer y.
For code such as the following:
Code:
public:
MYObj myObj1;
MyObj myObj2 = MyObj();
OutputManager::OutputManager(MyObj &_myObjArg) {
myObj1= _myObjArg;
}
OutputManager::OutputManager(MyObj _myObjArg) {
myObj1= _myObjArg;
}
I am trying to figure out what myObj1 is. Is it just a reference pointer?