Sign in to follow this  
ToastFlambe

Anonymous unions and the copy constructor

Recommended Posts

ToastFlambe    110
Simple quick question. I'm revamping my Vector class and put in an anonymous union like this:
union
{
    float index[2];
    float x, y;
};
Question is do I need a copy constructor still? Before I just had the "index" array and needed one but what happens now that its a union?

Share this post


Link to post
Share on other sites
Promit    13246
An anonymous union inside a struct is illegal. The union needs to be named.

Oh Fruny, where art though, with your crazy static member pointers?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this