|
헤더파일에 보면
다음과 같이 선언해서 오류가 났습니다.
void __fastcall TForm1::showPeronInfo(po p);
Form1클래스의 맴버함수 선언을 다음과 같이 선언해야합니다.
void __fastcall showPeronInfo(po p); //TForm1:: 을 빼고 선언
도움이 되셨기를 바랍니다.
//----------------------------------------
// ┏┓
// ┣┻┓┏ ┃┃ 작은 생각이 세상을 바꾼다
// ┃♡┃┣ ┣┫┏┓
// ┗━┛┗ ┃┃┣┫┏┓┏┓ - 정성훈.해미
// ━━━━━━━━━┣┛┣┛┗┫━━━━━━
//----------------------------------------
: void __fastcall TForm1::showPeronInfo(po p);
쥬신 님이 쓰신 글 :
: class TForm1 : public TForm
: {
: __published: // IDE-managed Components
: TMemo *Memo1;
: TButton *Button1;
: TEdit *Edit1;
: TEdit *Edit2;
: void __fastcall Button1Click(TObject *Sender);
: private: // User declarations
: public: // User declarations
: struct po
: {
: char name[10];
: int age;
: };
: __fastcall TForm1(TComponent* Owner);
: void __fastcall TForm1::showPeronInfo(po p);
: };
: --------------------------------------------------
: void __fastcall TForm1::Button1Click(TObject *Sender)
: {
:
: po per1;
: AnsiString goe;
: goe=Edit1 -> Text;
: goe=Edit2 -> Text;
: // Memo1 -> Lines -> Add("이름은:"+(per1.name=(Edit1->Text))));
: Memo1 -> Lines -> Add("나이는:"+(per1.age =(StrToInt(Edit2->Text))));
: showPeronInfo(per1);
:
:
: }
: void __fastcall TForm1::showPeronInfo(po p)
: {
: // AnsiString tpo;
: //Memo1->Lines->Add("이름은"+(p.name));//+"이고 나이는"+IntToStr(p.age)+"세");
: }
: //표시 해논곳이 에러 메세지가 나오는 곳입니다.
|