incompatible types when assigning to type 'CHANGE' from type
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/16 21:49:32
incompatible types when assigning to type 'CHANGE' from type 'struct CHANGE *'
typedef struct change
{
char str1[21];
char str2[21];
}CHANGE;
CHANGE *p=NULL;
p=(CHANGE*)calloc(3,sizeof(CHANGE*)); /*申请指针数组*/
p[0]=(CHANGE*)calloc(M,sizeof(CHANGE)); /把申请的地址存到指针数组里*/
大概就是这些...为什么会出错呢?
typedef struct change
{
char str1[21];
char str2[21];
}CHANGE;
CHANGE *p=NULL;
p=(CHANGE*)calloc(3,sizeof(CHANGE*)); /*申请指针数组*/
p[0]=(CHANGE*)calloc(M,sizeof(CHANGE)); /把申请的地址存到指针数组里*/
大概就是这些...为什么会出错呢?
前两句改一下:
CHANGE **p=NULL;
p=(CHANGE**)calloc(3,sizeof(CHANGE*)); /*申请指针数组*/
再问: 终于成功了...太感谢了!!
CHANGE **p是什么意思呢?不太懂...
也有char **p这样的吗?
再答: 就是二维指针
CHANGE **p=NULL;
p=(CHANGE**)calloc(3,sizeof(CHANGE*)); /*申请指针数组*/
再问: 终于成功了...太感谢了!!
CHANGE **p是什么意思呢?不太懂...
也有char **p这样的吗?
再答: 就是二维指针
incompatible types when assigning to type 'CHANGE' from type
There are many types of toothpaste to choose from.中type可不可以换
英语翻译Alex ask to change the lot type from "R" to "P" due to q
英语翻译Types of Mesh Demister Strip Type(Sectional Type) Layere
Many types of animals have now vanished from the earth.type和
英语翻译Due to the variety of data types (including unknown type
When he comes to my home tomorrow,I____(type) th
Can she type this letter for me,为什么不用types?
How to change Material Type FERT to HAWA?谢谢了,大神帮忙啊
问一个C语言里面的错误啊,argument of type "float" is incompatible with p
How to change batch number in insp.lot for type 0
How to type chinese characters?