S
shuisheng
Dear All,
I found there are two functions to reference an element in a
std:vector.
TYPE& operator[]( size_type index );
const TYPE& operator[]( size_type index ) const;
I am wondering why the second is needed. Seems we can always use the
first one to do what we want.
Thanks,
Shuisheng
I found there are two functions to reference an element in a
std:vector.
TYPE& operator[]( size_type index );
const TYPE& operator[]( size_type index ) const;
I am wondering why the second is needed. Seems we can always use the
first one to do what we want.
Thanks,
Shuisheng