Good for everyone, I'm stuck with this code ... it's something like a case that was presented previously but by making the corrections suggested in that post, I still have the same error ... please if you could help me. ..
I have these two structures
struct platos_por_pedido{
int id_pedido;
int item_nro;
int id_plato;
char observacion[30];
char cocinero[2];
char hora_inicio[4];
char hora_fin[4];
char estado[2];
struct platos_por_pedido * ptrSiguiente;
};
typedef struct platos_por_pedido Platos_por_Pedido;
typedef Platos_por_Pedido * ptrPlatos_por_Pedido;
struct lista_platos_por_pedido{
ptrPlatos_por_Pedido ptrCabeza;
struct lista_platos_por_pedido * ptrSiguiente;
};
typedef struct lista_platos_por_pedido Lista_Platos_por_Pedido;
typedef struct Lista_Platos_por_Pedido * ptrLista_Platos_por_Pedido;
Then in a portion of my code I create a pointer to the structure lista_platos_por_pedido
ptrLista_Platos_por_Pedido nodoNuevoLista;
nodoNuevoLista = malloc(sizeof(Lista_Platos_por_Pedido));
A little later I try to initialize the components
nodoNuevoLista->ptrCabeza = NULL;
nodoNuevoLista->ptrSiguiente = NULL;
And I pulled that error in the first line where I try to initialize.
This already left me on the canvas.