c
来自「C程序设计经典900例.zip」· 代码 · 共 23 行
TXT
23 行
#include <conio.h>
void main(void)
{
union TextColor {
struct {
unsigned char foreground:4;
unsigned char background:3;
unsigned char blinking:1;
} color_bits;
unsigned char value;
} colors;
colors.color_bits.foreground = BLUE;
colors.color_bits.background = RED;
colors.color_bits.blinking = 1;
textattr(colors.value);
clrscr();
cprintf("This is the new text colors\n");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?