首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

TC的库函数graphics.h使用出错,

2012-02-13 
TC的库函数graphics.h使用出错,救命啊!tc2.0编译不成功,这是程序:----------------#includegraphics.h m

TC的库函数graphics.h使用出错,救命啊!
tc2.0编译不成功,
这是程序:
----------------
#include   "graphics.h "
main()
{
    int   gdriver,gmode;
    initgraph(&gdriver,&gmode, "c:\\turbo   c ");
    circle(50,50,20);
}
--------------------
系统提示错误信息如下:
tc.exe
the   ntvdm   cpu   has   encountered   an   illegal   instruction
cs:a5ff   ip:f88b   op:ff   ff   ff   ff   choose   "close "   to   terminate   the   application
                      /cose/       /   ignore       /      


[解决办法]
库函数头文件最好用<>包含
具体改为如下试试:
#include "graphics.h "
main()
{
int driver=DETECT,mode;
 initgraph(&driver,&mode, " ");
circle(50,50,20);
}

int driver=DETECT,mode;
initgraph(&driver,&mode, " ");

热点排行
Bad Request.