0
I have a queue set like this:
typedef struct nodo
{
   int inf;
   struct nodo *next;
}NODO;
typedef struct
{
   struct nodo *INICIO;
   struct nodo *FIM;
}DESCRITOR;
typedef DESCRITOR *FILA_ENC;
And a function that queries and removes the first element of the queue:
int cons_ret (FILA_ENC f)
{
    if (eh_vazia(f))
    {
        printf ("retirada em fila vazia");
        exit(5);
    }
    int val=f->INICIO->inf;
    FILA_ENC aux=f->INICIO; /*erro aqui*/
    f->INICIO=f->INICIO->next;
    if (!f->INICIO)
    f->FIM=NULL;
    free(aux);
    return (val);
}
Only it’s giving an error that says "cannot Convert 'NODO* {aka nodo*}' to 'FILA_ENC {aka DESCRIPTOR*}' in initialization", and I don’t know why.
Would not be
FILA_ENC aux = f;?– stderr