Saving linked lists to a binary file
I'm trying to do the code to store a linked list to a binary file.
My strutures are:
Code:
typedef struct
{
char nome[25];
Coordenadas localizacao;
char morada[100];
char email[25];
char tipoComida[25];
Data feriasInicio;
Data feriasFim;
int diaDescanso;
char periodoFerias[25];
int numeroTelefone;
} Restaurante;
typedef struct No
{
Restaurante* restaurante;
struct No* proximo;
} No;
I'm not sure if I can simply store the No structs since they have only pointers. I already did a first try and the code does not work properly and doesn't always have the same behaviour so I'm wondering if that's the problem.
Any ideas?
Thanks in advance