I keep getting the following warning: initialization from incompatible pointer type. Through this line
Season season1 = (Season *) malloc(sizeof(Season));
This is the struct I defined in season.h
typedef struct season* Season;
I keep getting the following warning: initialization from incompatible pointer type. Through this line
Season season1 = (Season *) malloc(sizeof(Season));
This is the struct I defined in season.h
typedef struct season* Season;
You cast the result from malloc to "pointer to A" and assign it to a variable of type "A". With "A" being "Season".
It might become clearer with this version of your code,
edited for more speaking identifiers and fixed by using the right thing inside sizeof() and not casting the result of malloc().
typedef struct season* PointerToseason; // if you insist on hiding it inside a typedef
PointerToseason season1 = malloc(sizeof(struct season));
A widely preferred version of that is
PointerToseason season1 = malloc(sizeof(*season1));
It requires less knowledge of things which have been hidden inside typedefs (wisely or not).
Also, look closely at the too similar identifiers in your code season
and Season
.