c++ iterators

Discussion in 'OT Technology' started by Shibboleth, Apr 26, 2005.

  1. Shibboleth

    Shibboleth teh mad Plato skillz

    Joined:
    Sep 29, 2004
    Messages:
    1,769
    Likes Received:
    0
    Anyone know if an iterator class I can use for my own b-tree like structure, or do I have to make my own?
     
  2. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    The iterators that are built into the STL container classes are derived from iterator base classes defined in the <iterator> header file. If you want your B-Tree template to behave like a STL container class, you'd probably need to derive your own iterators from those base classes.

    Check google. There are probably numerous examples of how to roll your own STL-like templates.
     

Share This Page