Structs from one header into a struct in another header

后端 未结 1 1540
长发绾君心
长发绾君心 2021-01-25 10:26

I\'m having trouble on this... I have this header:

#ifndef PESSOA_H
#define PESSOA_H

typedef struct pa{
    int idade;
    int atend;
}pessoa;


void inicPessoa         


        
1条回答
  •  無奈伤痛
    2021-01-25 10:49

    You have no type called struct pessoa. You have struct pa, and you have pessoa (a typedef).

    So you need to change this:

    typedef struct pessoa elem_t;
    

    into one of:

    typedef struct pa elem_t;
    typedef pessoa elem_t;
    

    0 讨论(0)
提交回复
热议问题