I have the following code, and when I try to compile it, I get an error message:
error: 'list_item_t does not have a name named' state
Any creative ideas on how to make this part of the code compile without warnings and erros?
#if defined (_DEBUG_) #define ASSERT assert #else #define ASSERT( exp ) ((void)(exp)) #endif` typedef struct list_item { struct list_item *p_next; struct list_item *p_prev; #ifdef _DEBUG_ int state; #endif } list_item_t; main(int argc, char *argv) { list_item_t p_list_item; ASSERT(p_list_item.state == 0); }
alnet source share