[Prev][Next][Index]
Re: gcc says "structure has no member"
Meir,
I must tell you that I completely agree with the gcc comments to your program.
The errors at the main part are explained by the errors in the external
structure definition.
Then there is a problem in your accessing c1 by foo.c1, since c1 is a member of
another structure inside foo. So the inner structure's tag is really missing
there.
There's another inconsistency in your union, one of whose members is a char,
and the other is an int.
Regards
Dalia
--
+-----------------------------------------------------------------------------+
| Dalia Pongratz | E-mail: pongratz@milcse.cig.mot.com |
| Motorola Israel Ltd. | Phone (work): 972-3-5659720 |
| Cellular Software Engineering | 972-3-5659779 |
| | Fax: 972-3-5658205 |
+-----------------------------------------------------------------------------+