I am getting following error on compiling using gcc. I am currently using gcc version 3.4.6 Can any one tell me what is wrong in the code. And how can I recover from this.
list.h:39: error: redefinition of typedef 'list_t'
list.h:29: error: previous declaration of 'list_t' was here
The def in list.h is as as shown below.
Code:#ifndef _LIST_H #define _LIST_H typedef struct list_t list_t; typedef struct { void *next; void *prev; void *data; int datasize; list_t *list; } list_item_t; typedef struct list_t { list_item_t *head; list_item_t *tail; list_item_t *pMark; list_t *pPar; } list_t; #endif



LinkBack URL
About LinkBacks


