|
어떤분의 도움으로 이상하게 짯던 프로그램이 멋지게 수정해 주셨습니다만..
비주얼 C++에서요.. 이대로 돌리면 에러가
fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory
Error executing cl.exe.
라고 뜨던데.. 주위 사람들 말로는 graphics.h 파일이 없다고 하는데 어떻게 해야하나요..
아래 프로그램 수정해주신 분께서는 된다고 도움주신것 같은데.. 저는 계속 같은 애러가 납니다..
제가 써본 프로그램은 마이크로 비주얼 C++6.0 이랑, Turo C++3.1 윈도우 판입니다.. 사용환경은 윈도우 XP이구요.. 아참.. 도스용 TC C++3.0에는 링크가 안되구요.. 어떻게 해야 할지 모르겠습니다. ㅠㅠ
#include <graphics.h>
#include <math.h>
#include <conio.h>
#define CX 320 // VGA Center X
#define CY 240 // VGA Center Y
#define DM 200 // Diameter
#define PI 3.141592
#define Left CX-DM
#define Right CX+DM
#define Top CY-DM
#define Bottom CY+DM
void main()
{
int graphdriver=DETECT, graphmode;
int k;
double dA, dB;
double x, y, rd=PI/180;
initgraph(&graphdriver, &graphmode,"..\\bgi");
for (dA=1;dA<4;dA++)
for (dB=1;dB<4;dB+=.1)
{
clearviewport();
setcolor(8);
for(k=Left;k<=Right;k+=20) line(k,Top,k,Bottom);
for(k=Top;k<=Bottom;k+=20) line(Left,k,Right,k);
setcolor(15-(int)dA);
for(k=0;k<=360;k+=2)
{
x = cos(dA*k*rd) * (DM) + CX;
y = sin(dB*k*rd) * (-DM) + CY;
if(k==0) moveto(x,y);
else lineto(x,y);
}
if (getch()==27) exit(1);
}
closegraph();
}
|