outtextxy(settextstyle(),outtextxy()是什么意思其中后面的参数又是什么意思,谢谢了!)
本文目录
settextstyle(),outtextxy()是什么意思其中后面的参数又是什么意思,谢谢了!
settextstyle是设置文本风格outtextxy是输出文本settextstyle(高度,宽度,“字体的名字”); //高度和宽度为0的话为自适应outtextxy(x坐标,y坐标,“输出你想要的文字”) ; 懂了吗?
TC2.0中如何用outtextxy来输出多个变量的值
好吧我再来给你写个例子
#include 《conio.h》#include 《graphics.h》#include 《string.h》int main(){int gdriver = DETECT;int gmode;char str = ““;int a = 123;char b = ’M’;float c = 3.146f;double d = 5.24132;long e = 98760159L;int f = 4256;char g = ’k’;float h = 8.423f;double i = 9.72647;long j = 10245820L;int k = 31245;char l = ’G’;float m = 11.0416f;double n = 25.40259;long o = 2043195102L;initgraph(&gdriver, &gmode, “C:\\TC20\\BGI“);sprintf(str, “%d“, a);outtextxy(60, 20, str);sprintf(str, “%c“, b);outtextxy(90, 40, str);sprintf(str, “%.2f“, c);outtextxy(120, 60, str);sprintf(str, “%.4lf“, d);outtextxy(150, 80, str);sprintf(str, “%ld“, e);outtextxy(180, 100, str);sprintf(str, “%d“, f);outtextxy(210, 120, str);sprintf(str, “%c“, g);outtextxy(240, 140, str);sprintf(str, “%.2f“, h);outtextxy(270, 160, str);sprintf(str, “%.4lf“, i);outtextxy(300, 180, str);sprintf(str, “%ld“, j);outtextxy(330, 200, str);sprintf(str, “%d“, k);outtextxy(360, 220, str);sprintf(str, “%c“, l);outtextxy(390, 240, str);sprintf(str, “%.2f“, m);outtextxy(420, 260, str);sprintf(str, “%.4lf“, n);outtextxy(450, 280, str);sprintf(str, “%ld“, o);outtextxy(480, 300, str);getch();closegraph();return 0;}C语言中函数outtextxy问题
原型:extern void TextOut(int x, int y, char *str, int mode); 用法:#include 《system.h》 功能:在屏幕上指定位置输出字符串 说明:outtextxy为指向TextOut的宏,用法相同。 str所指向字符串可以为中文或英文。中文显示成16x16点阵,英文显示成8x16点阵。 mode决定往屏幕上写的方式,其值含义如下: 0:背景透明,点阵中为0的点不显示。 1:正常方式,即点阵中为0的点擦除,为1的点显示。 2:反显方式,即点阵中为1的点擦除,为0的点显示。 3:异或方式,即点阵中点的值和屏幕当前位置的值作异或后取值,为0则擦除,为1显示。举例: // TextOut.c #include 《system.h》 main() { clrscr(); TextOut(0,0,“文曲星“,1); TextOut(10,10,“文曲星“,0); TextOut(20,20,“您好“,2); TextOut(30,30,“GGV-金远见“,3); getchar(); return 0; }
更多文章:

webservice的作用(C#中webservice的作用是什么)
2025年2月17日 04:50

学sql的网站(我想自学Sql数据库,请问那些网站和教程可以,谢谢!)
2025年3月20日 05:50

comfortablely(seat什么意思 comfortable和comfortablely的词性 谢谢)
2025年3月11日 13:30

sponsors是什么意思(sponsor在外贸里是什么意思)
2025年3月25日 07:10

miff,0n,72种不同插法?melody与miffy 有关系吗
2025年3月4日 01:00

vigorously是什么意思(vortexed vigorously什么意思)
2025年4月4日 00:20

potentiometer(potentiometer是什么意思)
2025年3月4日 06:40

mac地址是什么 如何查询电脑mac地址?电脑mac地址在哪看
2025年3月24日 03:50

while语句循环的结构(while循环结构的语法和执行顺序是什么)
2025年3月26日 14:20

toddle(7m us toddle和7w us toddler区别是什么)
2025年2月25日 15:00