itorators

This is a discussion on itorators within the C++ Programming forums, part of the General Programming Boards category; This is an iteration for a container. The following code using it compiles corectlly. it=start; while (*it ! = key) ...

  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
    zen
    zen is offline
    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
    zen
    zen is offline
    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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21