sganeshcse
December 19th, 2006, 11:49 PM
Please look at this code
Please advice what I have to do.
below two classes are in one header file.
__gc class myclass
{
public:
myclass()
{ }
ArrayList* FEOmniFunds;
};
class TCFData
{
public:
TCFData();
~TCFData();
gcroot<myclass *> newobj;
}
extern TCFData *CFData
below code is in other cpp file
Below two line is in one function.
CFData = new TCFData();
memset(CFData, '\0', sizeof(TCFData));
Below two line is in another function.
CFData->newobj = new myclass();//Error is coming here
CFData->newobj->FEOmniFunds = new ArrayList(); //Here also
If I try to instantiate this object then I am getting the below error.
"An unhandled exception of type 'System.ExecutionEngineException' occurred in system.windows.forms.dll"
Please let me know why this error is coming?
Please advice what I have to do.
below two classes are in one header file.
__gc class myclass
{
public:
myclass()
{ }
ArrayList* FEOmniFunds;
};
class TCFData
{
public:
TCFData();
~TCFData();
gcroot<myclass *> newobj;
}
extern TCFData *CFData
below code is in other cpp file
Below two line is in one function.
CFData = new TCFData();
memset(CFData, '\0', sizeof(TCFData));
Below two line is in another function.
CFData->newobj = new myclass();//Error is coming here
CFData->newobj->FEOmniFunds = new ArrayList(); //Here also
If I try to instantiate this object then I am getting the below error.
"An unhandled exception of type 'System.ExecutionEngineException' occurred in system.windows.forms.dll"
Please let me know why this error is coming?