anonymous structs in union
anonymous structs in union
- Subject: anonymous structs in union
- From: Luigi Castelli <email@hidden>
- Date: Wed, 6 Jun 2007 00:02:16 -0700 (PDT)
Hi there,
I have an union declaration as follows:
typedef union _vec3
{
struct {
float x,y,z;
};
struct {
float s,t,r;
};
float values[3];
} t_vec3;
When I use the following code:
t_vec3 vector;
vector.x = 1;
vector.y = 2;
vector.z = 3;
X-code complains with this error:
error: t_vec3' has no member named 'x'
error: t_vec3' has no member named 'y'
error: t_vec3' has no member named 'z'
Does xcode have an option to support anonymous structs and unions ?
Thank you.
- Luigi
------------------------------------------------------------
THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION. ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED. IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT email@hidden AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.
------------------------------------------------------------
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden