这个程序怎么才能通过编译?

来源:百度知道 编辑:UC知道 时间:2024/06/10 13:56:32
题目:Press any key to change color, do you want to try it. Please hurry up!

#include <conio.h>
void main(void)
{
int color;
for (color = 0; color < 8; color++)
{
textbackground(color);/*设置文本的背景颜色*/
cprintf("This is color %d\r\n", color);
cprintf("Press any key to continue\r\n");
getch();/*输入字符看不见*/
}
}

http://zhidao.baidu.com/question/32206953.html?si=6

textbackground(0);
都是TC 上面的函数
DEC-C++不能用(那些函数都是TC自己扩展的)

所以那段代码DEC-C++不能编译,要编译的话请用TC.