Thread: Array of structs

  1. #1
    Registered User
    Join Date
    Mar 2008

    Array of structs

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


  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    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, 07: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, 03: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