zoukankan      html  css  js  c++  java
  • 设置文本及背景颜色

    #include<conio.h>
    main()
    {
        void *buf;
        clrscr();           /*清除字符屏幕*/
        gotoxy(35,15);          /*光标定位到(35,15)*/
        textcolor(YELLOW);         /*设置文本颜色为黄色*/
        textbackground(BLUE);         /*设置背景颜色为蓝色*/
        cprintf("hello world\n");         /*输出字符串hello world*/
        cprintf("hello computer\n");        /*输出字符串hello computer*/
        buf=(char *)malloc(2*11*2);        /*buf指向分配的内存空间*/
        gettext(35,15,60,16,buf);        /*保存指定范围内的文本到内存中*/
        puttext(20,5,45,6,buf);         /*将在内存中保存的文本输出*到指定位置*/
        gotoxy(30,10);          /*光标定位到(30,10)*/
        textattr(RED|128|GREEN*16);       /*用textattr设置文本属性*/
        cprintf("Moring");          /*输出字符串Morning*/
      }
  • 相关阅读:
    sqlplus中文问号
    mysql8.0 Authentication plugin 'caching_sha2_password' cannot be loaded
    Idea2018激活
    bzoj-5049-线段树
    HDU-6070-二分+线段树
    Aizu-2200-floyd+dp
    bzoj-4565-区间dp+状压
    bzoj-3195-状压dp
    bzoj-4870-组合dp+矩阵幂
    swiper使用心得
  • 原文地址:https://www.cnblogs.com/djcsch2001/p/1960120.html
Copyright © 2011-2022 走看看