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?
Anonymous unions and the copy constructor
Simple quick question. I'm revamping my Vector class and put in an anonymous union like this:
No, you do not. It'll get copied just fine.
Your original method should have copied automatically as well, if all it had was a raw array.
CM
Your original method should have copied automatically as well, if all it had was a raw array.
CM
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?
Oh Fruny, where art though, with your crazy static member pointers?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement