I'm trying to create a runtime component which supports windows phone 8. Brief Description of the Program is as :
- Application (C#) is going to fill some data in ref struct A
- It will call init API of ref class VVoiP with object of ref struct A.
- Ref class VVoip needs to have a array of objects of class B, so that it can have multiple instances.
C # Code :
using TestWRC;
namespace TestPrj
{
public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
VVoIP v1 = new VVoIP();
A a1 = new A();
a1.a = 10;
v1.init(a1);
}
}
}
C++ Code :
namespace TestWRC
{
public ref struct A sealed
{
public:
property int a;
};
struct B {
A^ A_obj;
};
public ref class VVoIP sealed
{
private:
B array[3]; /* Array of object to have multiple instance */
public:
void init(A a1);
};
}
using namespace TestWRC;
void VVoIP::init(A a1)
{
array[0].A_obj->a = a1.a; /* Filling local array with initialized data*/
}
the following errors coming from the above code:
error C3992: 'init':signature of public member contains invalid type 'TestWRC::A'
I am new to Windows phone 8, would somebody please say me what is this error, and how to rectify this. Thanks in advance.