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
[69967] [초보] 함수 만들기 질문
이근호 [llcchh123] 2725 읽음    2013-08-12 11:15
안녕하세요 오늘 C++ 빌더를 시작했는데요,

함수만드는데 계속 에러가 생겨서 질문을 드립니다.

void __fastcall TForm1::Button2Click(TObject *Sender)
{

        no1res = StrToFloat(LabeledEdit8->Text);
        no1fus = StrToFloat(no1res * fuseconst);
        LabeledEdit5->Text = FloatToStr(no1fus).sprintf("%3.2f",no1fus);
        //--------------------------------------
        no2res = StrToFloat(LabeledEdit9->Text);
        no2fus = StrToFloat(no2res * fuseconst);
        LabeledEdit6->Text = FloatToStr(no2fus).sprintf("%3.2f",no2fus);
        //--------------------------------------
        no3res = StrToFloat(LabeledEdit10->Text);
        no3fus = StrToFloat(no3res * fuseconst);
        LabeledEdit7->Text = FloatToStr(no3fus).sprintf("%3.2f",no3fus);
        //--------------------------------------
        LabeledEdit17->Text = FloatToStr(no1res * 1.5).sprintf("%2.1f",no1res * 1.5);
        LabeledEdit18->Text = FloatToStr(no2res * 1.5).sprintf("%2.1f",no2res * 1.5);
        LabeledEdit19->Text = FloatToStr(no3res * 1.5).sprintf("%2.1f",no3res * 1.5);
        //--------------------------------------
        LabeledEdit11->Text = FloatToStr(no1res * 1.5).sprintf("%2.0f",no1res * 1.5);
        LabeledEdit12->Text = upnum(no1res); <--------------이부분에서 에러가 납니다.
        LabeledEdit13->Text = LabeledEdit19->Text;

}
String upnum(float target)
{
        String Astring;
        String Bstring;
        String Finalstring;
        float Afloat;
        float Bfloat;
        Astring = FloatToStr(target).sprintf("%2.1f",target);
        Bstring = FloatToStr(target).sprintf("%2.0f",target);
        if(StrToFloat(Astring)>=StrToFloat(Bstring))
        {
                float finalfloat;
                finalfloat = StrToFloat(Bstring)+0.5;
                Finalstring = FloatToStr(finalfloat);
        }
        else
        {       Finalstring = Astring;

        }
        return Finalstring;
}
//---------------------------------------------------------------------------


헤더 파일에는

public:        // User declarations
        String __fastcall upnum(float target); <----- 이렇게 추가 하였습니다.
        __fastcall TForm1(TComponent* Owner);

};
에러메세지 :  [Linker Error] Unresolved external '__fastcall TForm1::upnum(float)' referenced from C:\USERS\ALKO11130059\DESKTOP\U-COM PROGRAM\UNIT1.OBJ
     
이제 막시작한 초보라서 구조체도 모르고 찾아보면서 했는데 위문제는 게시판 찾아봐도 없더라구요 도와주세요 부탁드립니다.

+ -

관련 글 리스트
69967 [초보] 함수 만들기 질문 이근호 2725 2013/08/12
69968     Re:[초보] 함수 만들기 질문 손님 2991 2013/08/12
69970         Re:Re:[초보] 함수 만들기 질문 이근호 2908 2013/08/12
69971             Re:Re:Re:[초보] 함수 만들기 질문 답변자 2645 2013/08/12
69972                 감사합니다.^^ 아주 잘됩니다. 이근호 2722 2013/08/12
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.