Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 预期‘;结构单元**’;但参数的类型为‘;结构单元&x2019;_C - Fatal编程技术网

C 预期‘;结构单元**’;但参数的类型为‘;结构单元&x2019;

C 预期‘;结构单元**’;但参数的类型为‘;结构单元&x2019;,c,C,大家好我希望你们都很好 我来这里寻求帮助是因为,我有一个小问题,当我试图编译我的程序时,我在main函数中的这一行d=DEPILER(*p)有一个错误 错误是 main.c:12:19: error: incompatible type for argument 1 of ‘DEPILER’ p = DEPILER(*p); ^ In file included from Indexation.h:4:0, from bas

大家好我希望你们都很好

我来这里寻求帮助是因为,我有一个小问题,当我试图编译我的程序时,我在main函数中的这一行d=DEPILER(*p)有一个错误

错误是

main.c:12:19: error: incompatible type for argument 1 of ‘DEPILER’
        p = DEPILER(*p);
               ^
In file included from Indexation.h:4:0,
             from base.h:1,
             from main.c:3:
PileID.h:18:9: note: expected ‘struct CELLULE **’ but argument is of type ‘struct CELLULE’
 Pile_ID DEPILER (Pile_ID *p);
     ^
main.c:14:21: error: incompatible type for argument 1 of ‘DEPILER’
     }while( DEPILER(*p) != NULL);
                 ^
In file included from Indexation.h:4:0,
             from base.h:1,
             from main.c:3:
PileID.h:18:9: note: expected ‘struct CELLULE **’ but argument is of type ‘struct CELLULE’
 Pile_ID DEPILER (Pile_ID *p);
     ^
Makefile:12 : la recette pour la cible « main.o » a échouée
make: *** [main.o] Erreur 1
我搜索了很多,想找出为什么我的程序不起作用,但我不知道,因为

d=卸卷机(*p)

*p

类型

桩号

我的脱卷机原型是

标识卸料机(桩号*p)

那他为什么想要这种类型的论点呢

细胞结构**

//我的主要

#include <stdio.h>
#include <stdlib.h>
#include "base.h"

int main(){

    Pile_ID p;
    identifiant d;

    p = Indexation("/home/mallent/FICHIER_PROJET/Textes");
    do{
      d = DEPILER(*p);
      //Copie(*d);
    }while( DEPILER(*p) != NULL);
}


// function depiler in file PileID.c

identifiant DEPILER (Pile_ID *p){
    assert(PILE_EST_VIDE);
    identifiant x;
    Pile_ID paux;
    paux=(*p)->suiv;
    x.d=(*p)->ID.d;
    x.titre=(*p)->ID.titre;
    free (*p);
    (*p)=paux;
    return x;
}


// function depiler in file PileID.h
#include "descripteur.h"
typedef struct etIdentifiant{
    descrip d;
    const char *titre;
}identifiant;

typedef struct CELLULE{
    identifiant ID;
    struct CELLULE *suiv;
}Cel;

typedef struct CELLULE * Pile_ID;
#包括
#包括
#包括“base.h”
int main(){
桩号p;
识别剂d;
p=指数化(“/home/mallent/FICHIER_PROJET/Textes”);
做{
d=卸卷机(*p);
//副本(*d);
}while(卸卷机(*p)!=NULL);
}
//文件PileID.c中的函数depiler
标识卸料机(桩号*p){
断言(如有);
识别剂x;
桩号paux;
paux=(*p)->suiv;
x、 d=(*p)->ID.d;
x、 滴度=(*p)->ID.titre;
自由(*p);
(*p)=paux;
返回x;
}
//文件PileID.h中的函数depiler
#包括“descripteur.h”
类型定义结构EtiIdentifiant{
描述d;
常量字符*滴度;
}鉴定人;
类型定义结构单元{
标识ID;
结构细胞*suiv;
}Cel;
类型定义结构单元*桩号;

PS:对不起我的英语,我希望你能理解,谢谢所有帮助我的人(^ ^)

try
d=DEPILER(&p)而不是
d=卸卷机(*p)

卸卷机(*p)-->
DEPILER&p谢谢,我忘了我需要给拆卷机一个地址^^