J
Jerome
Hi all,
I'm trying to use forward declaration with value class but I don't succeed
in compiling my (quite simple) sample code.
This is my code I'm trying to compile (Visual Studio 2003)
namespace managedDll
{
public __value class VecDouble;
public __value class VecFloat
{
public:
void SetValue(VecDouble vec)
{
// TODO
}
};
public __value class VecDouble
{
public:
void SetValue(VecFloat vec)
{
// TODO
}
};
}
I've got the following error when compiling:
error C2027: use of undefined type 'managedDll::VecDouble'
Every think work fine if my SetValues methods have the signature (Vec(Double
| Float) &vec).
The problem is that putting a '&' is not logical because I want to call
methods from C# code and with this signature I should write the following
code
VecDouble vec = new VecDouble();
vecFloat.SetValue(ref vec);
Instead I want to call my methods in this way:
vecFloat.SetValue(new VecDouble())
The first solution is not acceptable !.
Does anyone encounter the same problem ?
Great thanks.
Jerome
I'm trying to use forward declaration with value class but I don't succeed
in compiling my (quite simple) sample code.
This is my code I'm trying to compile (Visual Studio 2003)
namespace managedDll
{
public __value class VecDouble;
public __value class VecFloat
{
public:
void SetValue(VecDouble vec)
{
// TODO
}
};
public __value class VecDouble
{
public:
void SetValue(VecFloat vec)
{
// TODO
}
};
}
I've got the following error when compiling:
error C2027: use of undefined type 'managedDll::VecDouble'
Every think work fine if my SetValues methods have the signature (Vec(Double
| Float) &vec).
The problem is that putting a '&' is not logical because I want to call
methods from C# code and with this signature I should write the following
code
VecDouble vec = new VecDouble();
vecFloat.SetValue(ref vec);
Instead I want to call my methods in this way:
vecFloat.SetValue(new VecDouble())
The first solution is not acceptable !.
Does anyone encounter the same problem ?
Great thanks.
Jerome