Array of structs

This is a discussion on Array of structs within the C Programming forums, part of the General Programming Boards category; Is it possible to have an array of structs which are link listed? -Dyn4sty...

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    16

    Array of structs

    Is it possible to have an array of structs which are link listed?

    -Dyn4sty

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    That depends entirely on what you think you mean by that question. You can have an array of structs, yes. Those structs can contain pointers to other structs in the array, sure; and you can set it up so that the structs form a legitimate linked list independent of the ordering in the array. I don't see a compelling reason why you would want to do so, but it's certainly easy enough to do.

    You can also have an array of structs, each of which is the head of a (different) linked list.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 07-11-2008, 08:39 AM
  2. question about multidimensional arrays
    By richdb in forum C Programming
    Replies: 22
    Last Post: 02-26-2006, 09:51 AM
  3. Replies: 41
    Last Post: 07-04-2004, 04:23 PM
  4. array of structs initialization - PLZ help...
    By Vanya in forum C++ Programming
    Replies: 2
    Last Post: 12-11-2002, 08:10 PM
  5. Pointer to Array of Structs
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 03-06-2002, 08:34 AM

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