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

C/C++ Q/A
[1712] Re:[질문] c++빌더 콘솔 위자드 모드에서 컴파일 에러.
조준회 [] 1456 읽음    2002-12-12 10:53
아래 코드들은 도스용 코드들입니다.

윈도우에 콘솔 모드는 비슷해 보이지만.. 정확히는 도스모드가 아닙니다.

따라서 기존 도스명령들은 사용할수 없습니다.

방법은 도스로 부팅시켜서 Borland C++ 3.1등으로 컴파일해야 합니ㅏㄷ.


모라 님이 쓰신 글 :
: 아래 소스가 c++관련 소스인데
:
: c++빌더 6의 콘솔 위자드 모드로 해볼려니 에러가 뜨면서 안되더군요.
:
: 특히 graphics.h에서 에러가 잡히던데......
:
: 콘솔 모드에서 아랫 소스가 컴파일이 될까요?
:
: c++빌더란에다 할려니 c++에 더 가까운것 같기도 해서, 여기다 질문을 드립니다.
:
: --EX19-4.CPP 부분--
:
: #include <iostream.h>
: #include <graphics.h>
: #include <conio.h>
: #include <stdlib.h>
: #include <dos.h>
: #include "EX19-3.h"
: class Circle:public Point {
:   private:
:     int Rad;
:   public:
:     Circle(int,int,int,int);
:     void Show();
:     void Hide();
:     void Moveto(int,int);
:     void Resize(int);
:     int GetRad() { return Rad;}
:     };
: Circle::Circle(int x,int y,int c,int r):Point(x,y,c)
:   {
:   Rad=r;
:   }
: void Circle::Show()
:   {
:   Visible=true;
:   setcolor(Color);
:   circle(px,py,Rad);
:   }
: void Circle::Hide()
:   {
:   Visible=false;
:   setcolor(getbkcolor());
:   circle(px,py,Rad);
:   }
: void Circle::Moveto(int nx,int ny)
:   {
:   Hide();
:   px=nx;
:   py=ny;
:   Show();
:   delay(50);
:   }
: void Circle::Resize(int nr)
:   {
:   Hide();
:   Rad=nr;
:   delay(50);
:   Show();
:   }
: void main()
: {
: int gd=0,gm;
: initgraph(&gd,&gm,"");
: Circle WON(100,200,14,50);    // 원 객체 생성
: WON.Show();                   // 객체의 출력 
: for (int i=0;i<30;i++)        // 객체의 이동
:   WON.Moveto(WON.Getpx()+5,WON.Getpy());
: for (int j=0;j<50;j++)        // 객체의 크기 변경
:   WON.Resize(WON.GetRad()+3);
: getch();
: closegraph();
: }
:
:
: --EX19-3.h부분--
: #include <iostream.h>
: #include <graphics.h>
: #include <conio.h>
: #include <stdlib.h>
: #include <dos.h>
: enum Boolean {false,true};
: class Position {        // 기반 class정의
:   protected:
:     int px,py;
:   public:
:     Position(int,int);
:     int Getpx() {return px;}
:     int Getpy() {return py;}
:   };
: class Point:public Position {     // 파생 class정의
:   protected:
:     int Color;
:     Boolean Visible;
:   public:
:     Point(int,int,int);
:     int Getcolor() {return Color;}
:     Boolean Getvisible() {return Visible;}
:     void Show();
:     void Hide();
:     void Moveto(int,int);
:   };
: Position::Position(int x,int y)
:   {
:   px=x;
:   py=y;
:   }
: Point::Point(int x,int y,int c):Position(x,y)
:   {
:   Color=c;
:   Visible=false;
:   }
: void Point::Show()
:   {
:   Visible=true;
:   putpixel(px,py,Color);
:   }
: void Point::Hide()
:   {
:   Visible=false;
:   putpixel(px,py,getbkcolor());
:   }
: void Point::Moveto(int nx,int ny)
:   {
:   Hide();
:   px=nx;
:   py=ny;
:   Show();
:   delay(100);
:   }
:

+ -

관련 글 리스트
1710 [질문] c++빌더 콘솔 위자드 모드에서 컴파일 에러. 모라 1291 2002/12/12
1712     Re:[질문] c++빌더 콘솔 위자드 모드에서 컴파일 에러. 조준회 1456 2002/12/12
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.