Hi All,
I am trying to wrap my C++ classes in Managed C++ so I can call them from C#, which works great for regular parameters (int, float), but when I define...
public ref class Vector3
{
public:
Vector3(float in_x, float in_y, float in_z) {x=in_x; y=in_y; z=in_z;}
float x, y, z;
};
public ref class MCamera
{
private:
public:
MCamera(Vector3 in_source) {}
};
and then try and call this from C# with...
m_camera = new MCamera(new Vector3(0.0f, 0.0f, 0.0f));
I get the compile error...
D:\Documents and Settings\rprice\My Documents\Visual Studio 2005\Projects\Terraformer4\Terraformer4\Form1.cs(40,24): error CS1501: No overload for method 'MCamera' takes '1' arguments
The c++ assembly compiles find and the constructor looks good in the object browser for the assembly. Why is C# not recognizing this as having parameters?
The following works fine in C# too...
Vector3 test = new Vector3(0.0f, 0.0f, 0.0f);
test.x = 1.0f;
I am really confused... help!
Thanks
Rael