Resolve circular typedef dependency?

Posted by Nick on Stack Overflow See other posts from Stack Overflow or by Nick
Published on 2009-05-20T14:46:28Z Indexed on 2010/06/10 23:12 UTC
Read the original article Hit count: 134

Filed under:
|

What is the best way to resolve the following circular dependency in typedef-ing these structs?
Note the C language tag - I'm looking for a solution in standard gcc C.

typedef struct {
    char* name;
    int age;
    int lefthanded;
    People* friends;
} Person;

typedef struct {
    int count;
    int max;
    Person* data;
} People;

© Stack Overflow or respective owner

Related posts about c

    Related posts about circular-dependency