The following code is illegal ( Visual Studio 2012 Windows Phone( Creating a windows phone direct3d app ) )
a non-value type cannot have any public data members 'posX'
Header
ref class Placement sealed
{
public:
Placement(
float rotX,
float rotY,
float rotZ,
float posX,
float posY,
float posZ
);
float rotX, rotY, rotZ, posX, posY, posZ;
};
Cpp
Placement::Placement(
float rotX,
float rotY,
float rotZ,
float posX,
float posY,
float posZ
)
: posX( posX ),
posY( posY ),
posZ( posZ )
{
this->rotX = static_cast<float>(rotX);
this->rotY = static_cast<float>(rotY);
this->rotZ = static_cast<float>(rotZ);
}
Why and how do I have to set the properties? I'm used to normal C++ not C++ CX( I think it's called that right? )... Do I have to create methods that serve the properties?
*This problem stemmed from me originally trying to create a normal class and creating a pointer to it, only to be complained to about the fact I cannot use * rather I have to use ^ which means I have to create a ref class instead... I don't really understand why?*
Is it something to do with WinRT or more specifically ARM processors?