On 01/22/2010 12:03 PM, Jean-Marc Lasgouttes wrote:
"Vincent van Ravesteijn - TNW"<[email protected]>  writes:
But then

os[kk] = k;

doesn't work anymore, because os[kk] returns a copy and the copy is then
assigned the value that k has. That means that we are back at having
setters and getters instead of the [] operator.
Indeed :)

You can use operator[] for getting only. There is a certain logic to that, since you might NOT want to allow the use of [] to create a new entry.

rh

Reply via email to