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

type "int" cannot be assigned to an entity of type "unsigned char

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

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 什么类型?
申请内存空间了?

热点排行