reference

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael

    #1

    reference

    Hi,

    Could you please explain a little bit about vector<int>::re ference? I
    know there is vector<int>::it erator. What's ::reference?

    Thanks in advance,
    Michael

  • Victor Bazarov

    #2
    Re: reference

    Michael wrote:
    Could you please explain a little bit about vector<int>::re ference? I
    know there is vector<int>::it erator. What's ::reference?
    It's a type. It's something that a non-const operator[] returns. In
    most cases the 'reference' is a typedef for 'value_type&'. Just read
    the source, I bet the definition of this is in your <vectorheader .

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask


    Comment

    Working...