全文预览

c语言函数part2

上传者:似水流年 |  格式:pdf  |  页数:105 |  大小:9065KB

文档介绍
n;T\r?@voidfarouttextxy(intx,inty,char*textstring);\r@\r#include<graphics.h>\r#include<stdlib.h>\r#include<stdio.h>EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r#include<conio.h>\rintmain(void)\r(\r/*requestautodetection*/\rintgdriver=DETECT,gmode,errorcode;\rintmidx,midy;\r/*initializegraphicsandlocalvariables*/\rinitgraph(&gdriver,&gmode,\r/*readresultofinitialization*/\rerrorcode=graphresult();\rif(errorcode!=grOk)/*aneiToroccuiTed*/\r(\rprintf("Graphicserror:%s\n'\grapherrormsg(errorcode));\rprintf("Pressanykeytohalt:");\rgetch();\rexit(l);/*terminatewithanerrorcode*/\r)\rmidx=getmaxx()/2;\rmidy=getmaxy()/2;\r/*outputtextatthecenterofthescreen*/\r/*Note:theC.P.doesn'tgetchanged.*/\routtextxy(midx,midy,"Thisisatest.");\r/*cleanup*/\rgetch();\rclosegraph();\rreturn0;

收藏

分享

举报
下载此文档