我正在使用生成器 6。
不知道如何修复错误:
[C++ Error] loltimer.cpp(11): E2316 '_fastcall TForm1::TForm1(TComponent *)' is not a member of 'TForm1'
[C++ Error] loltimer.cpp(18): E2062 Invalid indirection
我的 .cpp 代码:
// line 11
__fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner)
{
comboSpell(ComboBox1);
}
//---------------------------------------------------------------------------
void TForm1::comboSpell(TComboBox *combo){
// line 18
*combo ->Items->Add("Flash");
*combo ->Items->Add("Ignite");
*combo ->Items->Add("Exhaust");
*combo ->Items->Add("Teleport");
*combo ->Items->Add("Ghost");
*combo ->Items->Add("Heal");
*combo ->Items->Add("Smite");
*combo ->Items->Add("Barrier");
}
我的 .h 代码:
public: // User declarations
__fastcall TForm1(TComponent Owner);
void comboSpell(TComboBox *combo);