当前位置: 代码迷 >> C语言 >> 在vc下怎么使用图形函数
  详细解决方案

在vc下怎么使用图形函数

热度:253   发布时间:2007-05-21 21:30:43.0
在vc下怎么使用图形函数

#include "stdafx.h"
#include "graphics.h"
void main(void)
{
int gdriver = DETECT , gmode;
// 初始化图形模式和逻辑变量
initgraph(&gdriver, &gmode, "");

setbkcolor(7);
setcolor(WHITE);
setwritemode(XOR_PUT);
setcolor(BLUE);
setlinestyle(SOLID_LINE,0,3);
//画小汽车的轮廓
rectangle(280,350,320,390);
rectangle(270,340,330,350);
rectangle(290,320,310,340);
rectangle(270,390,330,400);

setcolor(5);
//画小气车的车干
line(290,350,290,390);
line(300,300,300,320);
line(300,350,300,390);
line(310,350,310,390);
line(285,300,315,300);

getch();
closegraph();
}
显示
错误 1 fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory
怎么回事啊

搜索更多相关的解决方案: 图形  函数  

----------------解决方案--------------------------------------------------------
'graphics.h'它不是库函数吧
----------------解决方案--------------------------------------------------------
在vc中 是不能调用graphics库滴!~
只能在tc中用了,虽然不是很方便!~(我也是初学者,刚问了别人的,现学现卖哦,还不知道是不是真理!~)

[此贴子已经被作者于2007-5-21 23:44:26编辑过]


----------------解决方案--------------------------------------------------------

知道了


----------------解决方案--------------------------------------------------------
  相关解决方案