Stack overflow problem when using ArrayList with windows form

L

lizzly

I had a parent class which has a static member "frm1" Inside it.
When I open any other forms, I call the frm1's add-form-point function
through the parent class. So I can use frm1 to control all the opened
forms.

The function is like:
ArrayList *AryForm();

AryForm=new ArrayList();//this is initialized in the frm1_load event
and frm1 is load before any other forms

void add-form-point (Form *Frm)
{
AryForm->Add(Frm);
}


I got the stack overflow exception for this code.
Could anyone tell me what's wrong with it or how to fix it?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top