.h代码:
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include
#include
#include
#include
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton Button1;
void __fastcall Button1Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent Owner);
};
class Show : public TForm1
{
public:
__fastcall show();
private:
} ;
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
——————————————————————————
.cpp代码
#include
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent Owner)
: TForm(Owner)
{
}
__fastcall Show :: show()
{
ShowMessage("sssss");}
//---------------------------------------------------------------------------
void __fastcall Show::Button1Click(TObject *Sender)
{
show();
}
c++ builder初学者(胆大!) 该怎么添加一个类,帮忙改一改,谢谢
错误提示: