Any idea why this is happening ?Code:typedef struct
{ int flag ; //1 if 0 atrib
union {
char *cond;
struct {
char *var;
char *exp;
} atrib;
} conteudo;
Printable View
Any idea why this is happening ?Code:typedef struct
{ int flag ; //1 if 0 atrib
union {
char *cond;
struct {
char *var;
char *exp;
} atrib;
} conteudo;
Noticed it's missing a } in the end but still doesn't work.
Gives me this error now :
error: expected identifier or ‘(’ at end of input
What are you trying to do?
Just defining that structure.
What structure?Quote:
Originally Posted by DeanWinchester
Let me put it this way: you have in mind a structure. You want to express it in code, but you have a problem in doing so. Therefore, you should express it in code to tell us what you have in mind, then we can help you express it in code. Instead, when asked to explain, you just state the obvious that you have in mind a structure. Therefore, the most logical answer to your question is to be equally vague:
Yes, you made a mistake in your code.Quote:
Originally Posted by DeanWinchester
Doesn't help very much, does it? ;)
Why are you trying to embed the union, and another structure inside your structure? Proper indentation might actually be able to help you see where your problem lies.
Jim