>isn’t “const” keyword a hint that we won’t change input array? when using 'const' keyword we are merely telling the compiler that the memory address of the object (or the pointer) should not change. As you can see we are passing the CRefArray& which is to say that we are passing by reference, or the pointer to the object. Otherwise when we pass a variable directly to a function a local copy of that variable is made in the stack frame memory of that function. You can find more on this on the net for sure. On 4/30/2012 7:41 PM, piotrek marczak wrote: isn’t “const” keyword a hint that we won’t change input array? |
- CRefArray doesn't respect C++ copy semantics Nicolas Burtnyk
- Re: CRefArray doesn't respect C++ copy semantics jo benayoun
- Re: CRefArray doesn't respect C++ copy semantics Alok Gandhi
- Re: CRefArray doesn't respect C++ copy semanti... Nicolas Burtnyk
- Re: CRefArray doesn't respect C++ copy sem... Alok Gandhi
- Re: CRefArray doesn't respect C++ copy... piotrek marczak
- Re: CRefArray doesn't respect C++... Alok Gandhi
- Re: CRefArray doesn't respect... Nicolas Burtnyk
- Re: CRefArray doesn't respect C++... jo benayoun
- Re: CRefArray doesn't respect... Nicolas Burtnyk
- Re: CRefArray doesn't respect... Alok Gandhi
- Re: CRefArray doesn't res... Nicolas Burtnyk
- RE: CRefArray doesn't res... Marc-Andre Belzile
- Re: CRefArray doesn't res... piotrek marczak
- Re: CRefArray doesn't res... jo benayoun
- RE: CRefArray doesn't res... Marc-Andre Belzile
- Re: CRefArray doesn't res... piotrek marczak