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
[2683] [질문] 이 소스가 컴파일이 안되요./프포
neoracer [ ] 3473 읽음    2000-01-12 09:44
#include <iostream.h>

typedef unsigned short int USHORT;
enum BOOL { FALSE, TRUE };

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

void DrawShape() const;
void DrawShape(USHORT aWidth, USHORT aHeight) const;
private:
USHORT itsWidth;
USHORT itsHeight;
};

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

Rectangle::DrawShape() const /* 이 부분에서 DrawShape() 이
{                             rectangle 의 멤버가 아니라면서 컴파일이
         안됩니다. */
DrawShape(itsHeight, itsWidth);
}

void Rectangle::DrawShape(USHORT height, USHORT width) const
{
for(USHORT i=0;i<height;i++)
{
  for(USHORT j=0;j<width;j++)
  {
   cout << "*";
  }
  cout << "\n";
}
}

int main()
{
Rectangle theRect(30,5);
cout << "DrawShape(): \n";
DrawShape();
cout << "\nDrawShape(40,2): \n";
DrawShape(40,2);
return 0;
}

이유가 무엇이며 어떻게 해결해야 하나요? 답변 부탁드려요.


+ -

관련 글 리스트
2683 [질문] 이 소스가 컴파일이 안되요./프포 neoracer 3473 2000/01/12
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.