首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

程序运作不出,求解释

2012-09-24 
程序运行不出,求解释程序如下:#includestdio.h#includeconio.hmain(void){int colorfor(color0colo

程序运行不出,求解释
程序如下:
#include"stdio.h"
#include"conio.h"
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();
}
}

显示的错误:
--------------------Configuration: myprogram30 - Win32 Debug--------------------
Linking...
myprogram30.obj : error LNK2001: unresolved external symbol _textbackground
Debug/myprogram30.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

myprogram30.exe - 1 error(s), 0 warning(s)

请问为什么会出错,怎么改?

[解决办法]
textbackground函数未定义,查textbackground哪里定义的,或者自己定义一个。
[解决办法]
你的函数没有在你的头文件里
[解决办法]
用textbackground函数的话,需要在Turbo C下编译。
[解决办法]
error LNK2001: unresolved external symbol _textbackground

[解决办法]
编译环境很重要。

热点排行