Help crating a linked list of array of structs.

This is a discussion on Help crating a linked list of array of structs. within the C Programming forums, part of the General Programming Boards category; Hi, I have a requiremnt which needs me to create a linked list of (array of structs). and so I ...

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    39

    Exclamation Help crating a linked list of array of structs.

    Hi, I have a requiremnt which needs me to create a linked list of (array of structs).

    and so I created a struct array as:

    Code:
    typedef struct{
    	char Fa[30];
    	int flag;
    	int Time;
    	int evaluated;
        } Node_i[MAX];
    
    after which i wanted to create the linked list node as :
    
    typedef struct
    {
    	struct Node_i;
    	struct Node *pNext;
    }Node;
    however when i build the same i get the error, use of undefined type 'Node_i'

    please help!

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    When you use typedef you are making a new type, so you wouldn't be using the word struct before it. You would just be doing something like:
    Code:
    struct foo
    {
        Node_i myarraythingy;
        struct foo *next;
    };
    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linked List Not Saving Value as Int
    By bar338 in forum C Programming
    Replies: 4
    Last Post: 05-04-2009, 08:53 PM
  2. C++ Linked list program need help !!!
    By dcoll025 in forum C++ Programming
    Replies: 1
    Last Post: 04-20-2009, 11:03 AM
  3. Problem with linked list ADT and incomplete structure
    By prawntoast in forum C Programming
    Replies: 1
    Last Post: 04-30-2005, 02:29 AM
  4. Linked List and Array of Pointers
    By Nish in forum C Programming
    Replies: 4
    Last Post: 03-04-2005, 04:28 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 11:21 PM

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