Objective C - Using typedef struct in header file

c, linked-list, objective-c

Solution

typedef struct Node {
    int data;
    Node *next;
} Node;

@interface AALinkedList : NSObject
{
    Node node;
    // or Node *node;
}

Problem

I am trying to create a LinkedList in Objective C. In the .h file I am trying to create a Node using the code: ``` @interface AALinkedList : NSObject { typedef struct Node { int data; struct Node *next; } Node; } ``` This gives me an error saying `Type name does not allow storage class to be specified` What does this mean ? and how do I fix it ?

Original source