-------------
To c++novice:
NO, it does not return a constant refernece, it returns a reference to
constant IStack.
And yes there is nothing like constant reference. since references are
always const. u can not reset them.
read FAQ Lite [18.8]
Sorry for the confusing use of terminology. The only reason I said
"constant reference" is because the book says so! Here is the quote:
"The constructor of StackSeq is called with a reference to a const
IStack. One of the data members is also a reference to a const IStack.
A const reference cannot be used to change the object it refers to."
"A constant reference..."? As you say, all references are constant. I
just assumed that it was a common for references that return constants
to be referred to as "constant references". Actually, I bet that they
ARE commonly referred to in this manner, even though it's wrong
terminology.
---------
Thanks to Karl and everyone else. That makes sense now. The book was
wrong.
Cheers,
Deets