There are three .h
files
A.h:
#ifndef __A_H__
#define __A_H__
#include"Card.h"
#include"B.h"
struct A{
Card card;
.....
};
void getCards(A *a, int num);
#endif
B.h
#ifndef __B_H__
#define __B_H__
#include"Card.h"
#include"A.h"
struct B{
Card card;
.....
};
void getCards(A *a, B *b, int num);
#endif
Card.h
#ifndef __CARD_H__
#define __CARD_H__
struct Card{
int num;
char *type;
};
#endif
Since A.h
and B.h
includes each other, not all header files are included.
Please give me some advices.