ambuli
asked on
Using sys/queue.h List macros
I have the following code in a.h file
I want to pass the "the_list" as arguments to functions... what is the type of the_list here.
typedef struct list_entry
{
LIST_ENTRY(list_entry) chain;
char *id;
bool enabled;
} list_entry_t;
LIST_HEAD(list_head, list_entry) *the_list;
I want to pass the "the_list" as arguments to functions... what is the type of the_list here.
list_entry_t *find_entry(???, const char *id)
{
}
Run your header file through the preprocessor only and examine the result, it will contain teh exact type of 'the_list'. This is done by using 'gcc -E <files>'.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank you!