stdio文件函数详解(8)
发布时间:2021-06-07
发布时间:2021-06-07
stdio文件常用函数
#include <conio.h>
int main()
{
int gdriver=DETECT,gmode,errorcode;
int midx,midy;
initgraph(&gdriver,&gmode,);
errorcode=graphresult();
if (errorcode!=grOk)
{
printf("Graphics error: %s",grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
midx=getmaxx()/2;
midy=getmaxy()/2;
setcolor(getmaxcolor());
settextjustify(CENTER_TEXT,CENTER_TEXT);
outtextxy(midx,midy,"press any key to clear the screen:");
getch();
cleardevice();
outtextxy(midx,midy,"press any key to quit:");
getch();
closegraph();
return 0;
上一篇:第三章 网络危机的应对策略