int main(void)
{
int i=0,x0;
int x,y,color;
char *s1,*s2,*s3;
int gdriver=DETECT,gmode; /* 自动检测硬件(图形显示器硬件) */
int errorcode; /*定义错误信息*/
initgraph(&gdriver;,&gmode;,"c:\\tc30\\bgi"); /*初始化图形*/
errorcode=graphresult(); /*获取错误信息 */
if (errorcode!=grOk) /*错误发生判断*/
{
printf("graphics error:%s\n",grapherrormsg(errorcode)); /*输出错误代码*/
printf("press any key to halt");
getch();
exit(1); /*退出程序*/
}