win7下安装VC++6.0,也已安装Easyx,为什么还会出现编译错误,如图: C新手,请高手指教,谢谢。

程序:
#include <math.h>
#include <graphics.h>
main()
{
int x0 = 320, y0 = 240;
int n = 25, i, j, r = 180;
int x[50], y[50];
int gdriver = DETECT, gmode;
initgraph(&gdriver, &gmode, ""); /*图形方式初始化*/
cleardevice(); /*清屏*/
setbkcolor(WHITE); /*设置背景颜色为白色*/
setcolor(GREEN); /*设置绘图颜色为绿色*/
for (i = 0; i < n; i++)
{
x[i] = r * cos(2 *3.1415926 * i / n) + x0; /*确定横坐标*/
y[i] = r * sin(2 *3.1415926 * i / n) + y0; /*确定纵坐标*/
}
for (i = 0; i <= n - 2; i++)
{
for (j = i + 1; j <= n - 1; j++)
line(x[i], y[i], x[j], y[j]); /*将上面确定的各点之间进行连线*/
}
getch();
closegraph(); /*退出图形界面*/
}

编译出错提示:
fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory

好像是定义错误把
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-11-09
graphics.h头文件的搜索路径不对,或者是没有这个头文件追问

我把Easyx中的include文件和lib文件也都放在了VC++6.0中的include中和lib了呀,这样也不对吗?

追答

如果你是SDK程序,你看看是不是MFC目录里了

相似回答