C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[38364] [답변] 헤더파일에 선언이 잘못되었습니다.
정성훈.해미 [sage5nor] 855 읽음    2004-12-13 11:05
헤더파일에 보면
다음과 같이 선언해서 오류가 났습니다.
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)+"세");
: }
: //표시 해논곳이 에러 메세지가 나오는 곳입니다.

+ -

관련 글 리스트
38362 오류가 나는데 원인은 알겠는데요 고쳐야할 방법을 모르겠네요 쥬신 730 2004/12/13
38364     [답변] 헤더파일에 선언이 잘못되었습니다. 정성훈.해미 855 2004/12/13
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.