C语言中没有办法运行出图形,找不到指定路径怎么办。

来源:百度知道 编辑:UC知道 时间:2024/06/19 18:44:49
这个是我的程序:#include"graphics.h"
#include"stdio.h"
#include"math.h"
#include"string.h"
#define PI 3.1415926

main()
{
int gd,gm;

float sup,sdown,deg,x,y,xh,yh,s0,i,sh,sl;

gd=VGA;gm=VGAHI;
initgraph(&gd,&gm,"d://projects");
getch();

s0=35;
sh=7;
xh=320;
yh=3*s0+240;

for (i=1;i<5500;i++)
{
deg=i/100;
sup=7*deg/55;

x=3*(s0+sup)*sin(PI*deg/180)+320;
y=3*(s0+sup)*cos(PI*deg/180)+240;
line(xh,yh,x,y);
xh=x;
yh=y;
}

for

你需要拷贝TC的图形库支持文件到你写的可执行程序的目录。

比如你编译完代码生成了D:\test\12345.exe
那么你需要将TC的图形库(一般为egavga.bgi或者CGA.bgi)拷贝到D:\test目录下。

这些库文件可以在网上下载,也可以在TC安装目录中找到。