Hi,
Iam using the below code for forms singleton in c#.. When I convert it to VC++ its giving error..
c# code
======
private static Form2 _instance = null;
public static Form2 GetForm (bool IsMDIChild, Form1 frm)
{
if (_instance == null)
_instance = new Form2();

if (_instance.IsDisposed)
_instance = new Form2();

if (IsMDIChild)
_instance.MdiParent = frm;

return _instance;
}

I convert it like a below.. to vc++2010
===========================

public: static Form2^ Form2::_instance = nullptr;

public: static Form2^ Form2::GetForm(bool IsMDIChild, Form1^ MyInstFrm) {
if (_instance == nullptr)
_instance = gcnew Form2();

if (_instance->IsDisposed)
_instance = gcnew Form2();

if (IsMDIChild)
_instance->MdiParent = MyInstFrm;

return _instance;
}

But its giving below error

01. Error c2061 Syntax error : Identifier 'Form1'

Thanks