Thread: itorators

  1. #1
    Unregistered
    Guest

    itorators

    This is an iteration for a container. The following code using it compiles corectlly.

    it=start;
    while (*it ! = key)
    it = it +1;
    cout *it;



    it=conainer.begin();
    *it=x;



    it=container.begin();
    container.insert(container.end(), *it);



    I amn trying to figure out what the containers are.
    Are they arrays?
    list?
    vector?
    heck I don't know.
    Any insite would be great.
    Peter

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    They could be any of the STL containers, as each one will have an iterator defined for it. But if you have the source code then why don't you know what container the iterator is for?
    zen

  3. #3
    Unregistered
    Guest
    I do not have the source code, I am trying to identify the containers.

  4. #4
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    I'm confused. If you just need a list of the STL containers then they include -

    • deque
      list
      map
      multimap
      multiset
      set
      vector
      string
    zen

  5. #5
    Unregistered
    Guest
    Think of them as objects that are similar to pointers.

Popular pages Recent additions subscribe to a feed