我是新手,学的最基本的C语言。怎么改变程序运行运行时出现的字体的颜色呢,需要什么头文件,什么函数

来源:百度知道 编辑:UC知道 时间:2024/09/24 09:23:20
我指的是和C++比较像的那个C语言,这个问题我问过,但有人答的不是C语言啊,看不懂是什么语言

用textcolor函数(包含在conio.h中)设置字体和背景颜色 是在文本方式下输出的
用cprintf()输出格式和printf()是一样的 给你个测试函数

#include <stdio.h>
#include <conio.h>
int main(void)
{
int i;

for (i=0; i<15; i++)
{
textcolor(i);
cprintf("Foreground Color\r\n");
}

return 0;
}