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
[28371] 에러의 이류를 모르겠습니다..
오동섭 [ods76] 888 읽음    2003-12-30 15:31
안녕하세요..c++ 빌더로 공부를 하고 있습니다..

도데체 이 소스의 에러의 이유를 모르겠네요..참고로 teach your self c++10.2 소스입니다..이것 말고도 소스 에러가 부지기수로 나고 있어서 고치고 고쳐서 코딩해보는데 힘드네요..휴..

//---------------------------------------------------------------------------

#include <vcl.h>
#include <iostream.h>
#pragma hdrstop

//---------------------------------------------------------------------------

class Rectangle
{
public :
        Rectangle(int width, int height);
        ~Rectangle();

        void DrawShape(int aWidth, int aHeight, int UseCurrentVals = 1);

private :
        int itsWidth;
        int itsHeight;
};

Rectangle::Rectangle(int width, int height)
{
        itsWidth = width;
        itsHeight = height;
}

Rectangle::~Rectangle()
{
}

void Rectangle::DrawShape(int width, int height, int UseCurrentVals)
{
        int printWidth;
        int printHeight;

        if (UseCurrentVals != 1)
          {
                printWidth = itsWidth;
                printHeight = itsHeight;
          }
        else
          {
                printWidth = width;
                printHeight = height;
          }

        for (int i = 0; i<printWidth; i++)
          {
            for(int j = 0; j<printHeight; j++)
              {
                cout << "*";
              }
            cout << "\n";
          }
}

int main()
{
        Rectangle rect;
        cout << "DrawShape(0, 0, TRUE)..\n";
        rect.DrawShape(0, 0, TRUE);
        cout << "DrawShape(40, 2)..\n";
        rect.DrawShape(40, 2);

        int i;
        cin >> i;
        return 0;
}
//---------------------------------------------------------------------------


에러는 메인함수의         Rectangle rect;              -> E2379 Statement missing ;
                          rect.DrawShape(0, 0, TRUE);  -> E2451 Undefined symbol 'rect'

에서 나옵니다..도데체 이유가 뭘까요? 흐흐흑..

+ -

관련 글 리스트
28371 에러의 이류를 모르겠습니다.. 오동섭 888 2003/12/30
34208     Re:에러의 이류를 모르겠습니다.. 오동섭 814 2003/12/31
34207     Re:에러의 이류를 모르겠습니다.. 김상구.패패루 883 2003/12/31
34206     Re:에러의 이류를 모르겠습니다.. oseb 818 2003/12/30
34205     Re:에러의 이류를 모르겠습니다.. oseb 805 2003/12/30
28378     [답변] vcl.h 사용에 의한 클래스 중복과 생성자의 사용 오류 정성훈.해미 1333 2003/12/31
34204         Re:[답변] vcl.h 사용에 의한 클래스 중복과 생성자의 사용 오류 오동섭 941 2003/12/31
34203         Re:[답변] vcl.h 사용에 의한 클래스 중복과 생성자의 사용 오류 오동섭 903 2003/12/31
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.