![]() |
#2
奔跑的鸟2008-09-28 20:18
|

#include<graphics.h>
#include<stdio.h>
main()
{
int graphdriver=VGA;
int graphmode=VGAHI;
initgraph(&graphdriver,&graphmode,"");
cleardevice();
moveto(100,20);
lineto(100,80);
moveto(200,20);
lineto(100,80);
line(100,90,200,90);
linerel(0,20);
moverel(-100,0);
linerel(30,20);
getch();
closegraph();
return 0;
}
#include<stdio.h>
main()
{
int graphdriver=VGA;
int graphmode=VGAHI;
initgraph(&graphdriver,&graphmode,"");
cleardevice();
moveto(100,20);
lineto(100,80);
moveto(200,20);
lineto(100,80);
line(100,90,200,90);
linerel(0,20);
moverel(-100,0);
linerel(30,20);
getch();
closegraph();
return 0;
}
错误信息:
---------- Compiler Link ----------
Invalid keyboard code specified
Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
e:\c\cdemo\test1.c:
Turbo Link Version 5.0 Copyright (c) 1992 Borland International
Error: Undefined symbol _closegraph in module e:\c\cdemo\test1.c
Error: Undefined symbol _linerel in module e:\c\cdemo\test1.c
Error: Undefined symbol _moverel in module e:\c\cdemo\test1.c
Error: Undefined symbol _line in module e:\c\cdemo\test1.c
Error: Undefined symbol _lineto in module e:\c\cdemo\test1.c
Error: Undefined symbol _moveto in module e:\c\cdemo\test1.c
Error: Undefined symbol _cleardevice in module e:\c\cdemo\test1.c
Error: Undefined symbol _initgraph in module e:\c\cdemo\test1.c
Available memory 4125248
Output completed (0 sec consumed)