what is an iterator

This is a discussion on what is an iterator within the C Programming forums, part of the General Programming Boards category; What is an iterator in a double linked list and what is it used for...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    118

    what is an iterator

    What is an iterator in a double linked list and what is it used for

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    "Iterator" is more of a C++ or Java term. Applying the concept in C, it would just be a pointer or function used to walk a list from head to tail.

    The traditional use of i as the control variable in for() loops which iterate through an array stands for either index or iterator -- same principle.
    Last edited by MK27; 11-30-2011 at 06:25 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Iterator
    By MarkZWEERS in forum C++ Programming
    Replies: 19
    Last Post: 05-20-2008, 12:16 AM
  2. Connecting input iterator to output iterator
    By QuestionC in forum C++ Programming
    Replies: 2
    Last Post: 04-10-2007, 03:18 AM
  3. std::map::iterator
    By Magos in forum C++ Programming
    Replies: 2
    Last Post: 02-03-2006, 07:47 PM
  4. Do we really need iterator?
    By Antigloss in forum C++ Programming
    Replies: 3
    Last Post: 06-13-2005, 11:59 AM

Tags for this Thread


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