我已经解决了包括彼此在内的标题问题
但我有这个新错误c2512。这是我的代码:
“rstc.h”
public ref class rstc : public System::Windows::Forms::Form
{
ref class ddc;
public:
rstc(System::Windows::Forms::Form ^ y)
{otherform = y;
InitializeComponent();
}
private: System::Windows::Forms::Form ^ otherform;
/////////////////////////////////
ddc ^ x2 = gcnew ddc(this);//////is here where the error is pointed
x2->Show();
this->Hide();
“ddc.h”
public ref class ddc : public System::Windows::Forms::Form
{
ref class rstc;
public:
ddc(System::Windows::Forms::Form ^ y)
{otherform = y;
InitializeComponent();
}
private: System::Windows::Forms::Form ^ otherform;
这段代码转到另一个形式“rstc”
rstc ^ x2 = gcnew rstc(this);
x2->Show();
this->Hide();
我认为错误C2227与第一个错误有关
这是完整的错误
error C2512: 'final::ddc::rstc' : no appropriate default constructor available