User Profile

Collapse

Profile Sidebar

Collapse
Cagin
Cagin
Last Activity: Jun 16 '11, 11:17 AM
Joined: Jun 16 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Cagin
    replied to C - Macro problem with nested structures
    in C
    Yeah, you are right. I used to have a pointer problem, I fixed it. Thanks for help.
    See more | Go to post

    Leave a comment:


  • Cagin
    started a topic C - Macro problem with nested structures
    in C

    C - Macro problem with nested structures

    I define a macro like this:

    Code:
    #define L(p) ((p).value.len)
    
    typedef struct node
    {
    	int dimension;
    	int position;
    	int size;
    
    	union 
    	{
    	    long len;
    	    float f;
    
    	    } value;
    
    	struct node *prev;
    	struct node *next;
    
    } node, *np;
    and later,when I try to use that macro,
    I have this error:
    ...
    See more | Go to post
    Last edited by Banfa; Jun 16 '11, 11:06 AM. Reason: Removed the extra blank lines
No activity results to display
Show More
Working...