I have this problem of removing an element from the beginning of a list, even doing the schematic in the drawing I could not. The strange thing is that it works with up to 3 elements, from the 4 cmd (which to using gcc to compile) to respond. Any idea?
typedef struct evento_t {
double tempo;
char descricao[50];
int id_origem, id_destino;
struct evento_t *prox;
} evento_t;
void eventos_remover_inicio (evento_t **lista) {
evento_t *auxiliar = *lista;
if (*lista == NULL)
printf ("Lista vazia\n");
else
*lista = auxiliar->prox;
free(auxiliar);
}