在c中创建结构

标签 c struct

#include <stdio.h>
#include <stdlib.h>
#define MAX 80

typedef struct
{
    char nome[MAX];
    int num_bi;
    char *data_entrada;
}Paciente;


typedef struct lnode *List;
typedef struct lnode
{
    Paciente pac;
    List next;
}List_node;

我正在声明这些结构,但存在三个错误

“Paciente”的冲突类型

重新定义“struct lnode”

“List_node”的冲突类型

谁能帮帮我

最佳答案

尝试使用:

typedef struct Pacientes
{
    char nome[MAX];
    int num_bi;
    char *data_entrada;
}Paciente;

typedef struct NodeLists
{
    Paciente pac;
    List next;
}NodeList;

关于在c中创建结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30020206/

相关文章:

颜色并没有以诅咒结束

c - 线程安全的文件复制

C struct malloc 和指针数组实现

c++ - 工作 "within"结构 C/C++

c - 如何在 C 中实现位集

c# - PInvokeStackImbalance 不是由 CallingConvention 引起的

c - 排列器不产生字典输出

c - 代码没有错误,但程序停止运行

c++ - 读取位图文件

c - "useless type qualifier"错误