读书人

type quot;intquot; cannot be assigned to an

发布时间: 2012-09-07 10:38:15 作者: rapoo

type "int" cannot be assigned to an entity of type "unsigned char *"
菜鸟请教!
MDK 开发嵌入式程序


unsigned char *p;
p=str;
if(name==NULL)
{
return 0;
}
p=str_cope(p,"<tr class=\"STYLE1\">");

unsigned char *str_cope(unsigned char *drc,unsigned char *src){
while( *src !='\0' )
{ *(drc++) = *(src++); }
return drc;
}

赋值语句为什么包类型不匹配呢?
..\Source\Web\web_str.c(101): error: #513: a value of type "int" cannot be assigned to an entity of type "unsigned char *"

[解决办法]
把相关函数的完整代码贴上.
[解决办法]
str 什么类型?
申请内存空间了?

读书人网 >驱动开发

热点推荐