编译出错,这些类型我都不懂,怎么解决
//---------------------------------------------------------------------------#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TMDIFrm *MDIFrm;
//---------------------------------------------------------------------------
__fastcall TMDIFrm::TMDIFrm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TMDIFrm::New1Click(TObject *Sender)
{
TChildFrm *NewChildFrm=new TChildFrm(this);
NewChildFrm->Caption=NewChildFrm;
}
//---------------------------------------------------------------------------
void __fastcall TMDIFrm::Open1Click(TObject *Sender)
{
if(OpenDialog1->Execute())
{
TChildFrm *NewChildFrm=new TchildFrm(this);
NewChildFrm->RichEdit1->Lines->LoadFromFile(OpenDialog1->FileName);
NewChildFrm->Caption=ExtractFileName(OpenDialog1->FileName);
}
}
//---------------------------------------------------------------------------
Build
[C++ Error] Unit1.cpp(21): E2034 Cannot convert 'TChildFrm *' to 'AnsiString'
[C++ Error] Unit1.cpp(28): E2303 Type name expected
[C++ Error] Unit1.cpp(28): E2034 Cannot convert 'int *' to 'TChildFrm *'
[C++ Error] Unit1.cpp(28): E2141 Declaration syntax error