Upon decomposition of my C program I've come across the problem of accessing the structures. Here's the code
storage.h
#ifndef STORAGE_H
#define STORAGE_H
#include "list.h"
#define MAX_TITLE_SIZE 1000
typedef struct Finances {
int revenue;
} Finances;
typedef struct Website
{
char title[MAX_TITLE_SIZE];
int visitors;
float average;
Finances revenue;
} Website;
List * Strage_readFile(const char * fileName);
#endif
storage.c
#include "storage.h"
void blankfunc();
list.h
#ifndef LIST_H
#define LIST_H
#include "storage.h"
typedef struct List {
struct List * next;
} List;
#endif
list.c
#include "list.h"
void blankfunc();
I'm getting this error
storage.h:22:1: error: unknown type name ‘List’
List * Strage_readFile(const char * fileName);
^~~~
So, how can I organize the connection between these two headers, so that both Website and List structures were accessible in either headers?