在C语言中编译时出现的问题,虽然包含但未检测到结构

在C语言中编译时出现的问题,虽然包含但未检测到结构,c,C,我试图用C语言编译3个文件。一个是main.C,我在其中声明变量,另一个是cuenta.h,另一个是cliente.hcuenta.h在cliente.h中的另一个结构中使用了一个结构,但出现了此错误。我怎样才能解决这个问题?谢谢 客户 昆塔 错误 没有必要在cuenta.hy中包含“client.h”。如果有交叉包含,请删除cuenta.hTo中cliente.h的包含,以扩展@Hitokiri comment。通过将cliente.h包含到cuenta.h中,它会导致InfoCliente定

我试图用C语言编译3个文件。一个是
main.C
,我在其中声明变量,另一个是
cuenta.h
,另一个是cliente.h
cuenta.h
cliente.h
中的另一个结构中使用了一个结构,但出现了此错误。我怎样才能解决这个问题?谢谢

客户

昆塔

错误


没有必要在cuenta.hy中包含“client.h”。如果有交叉包含,请删除cuenta.hTo中cliente.h的包含,以扩展@Hitokiri comment。通过将
cliente.h
包含到
cuenta.h
中,它会导致
InfoCliente
定义出现在
Tarjeta
定义之前。您尚未显示整个文件,因此不清楚
curenta.h
是否真的需要
cliente.h
中的任何内容。如果没有,只需删除
#include cliente.h
不相关但很重要的一点:使用页眉护板!没有必要在cuenta.hy中包含“client.h”。如果有交叉包含,请删除cuenta.hTo中cliente.h的包含,以扩展@Hitokiri comment。通过将
cliente.h
包含到
cuenta.h
中,它会导致
InfoCliente
定义出现在
Tarjeta
定义之前。您尚未显示整个文件,因此不清楚
curenta.h
是否真的需要
cliente.h
中的任何内容。如果没有,只需删除
#include cliente.h
不相关但很重要的一点:使用页眉护板!
#ifndef PACABANK_CLIENTE_H
#define PACABANK_CLIENTE_H

#include "cuenta.h"
#include "fecha.h"

typedef struct {
    char *dni;
    char *titular;
    Tarjeta tarjeta;
}InfoCliente;
#ifndef PACABANK_CUENTA_H
#define PACABANK_CUENTA_H

#include "cliente.h"
#include "fecha.h"

typedef struct
{
    int numero_tarjeta;
    char *iban;
    Fecha caducidad;
    char *nombre_titular;
    int cvv;
    char *tipo; //mastercard, visa, american express.....
    float limite;
}Tarjeta;
In file included from cuenta.h:7:0,
                 from cuenta.c:5:
cliente.h:14:5: error: unknown type name 'Tarjeta'
     Tarjeta tarjeta;