THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2006 at 05:45, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.5-10
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Hi,
it's a simple and basic question, but I can't find a solution. I have the following class (don't ask, why I use my own Vector class, it's part of a physical simulation code, that I want to use as a black box) :
class Vector3
{
public:
union {
struct {
float x, y, z;
};
float m[3];
};
Vector3() { } // blank constructor
Vector3(float x, float y, float z); // constructor with 3 values
void add(Vector3 & A);
... // further methods...
};
The problem is, that I get compiler errors with CodeWarrior in the lines, where I try to access the values with Vector3 v.x:
Error: undefined identifier 'x'...
With VC6 everything is fine!? Any tips?
Thank you.