Hello, I'm having trouble working with linked sublists.
I would like to know the correct way to insert a sublist into a list.
I declare the lists as follows:
struct Casa
{
int id_consumidor;
int casa;
float consumo;
char *nome_consumidor;
struct Casa *proxc;
}
typedef struct Casa house;
struct Rua
{
int id_rua;
char *nome_rua;
house *head_casa;
struct Rua *proxr;
}
typedef struct Rua street;
struct Bairro
{
int id_bairro;
char *nome_bairro;
street *head_rua;
struct Bairro *proxb;
}
typedef struct Bairro nhood;
Is this form correct? How could I do to insert a list of houses within a list of streets and a list of streets within a list of neighborhoods.