I want to create a queue or check pool .. like a Queue standby (FIFO) and I have some difficulties. For now the code I have is giving me some errors.
I'm having gender errors:
Item.h:16:16: warning: struct has no members [-Wpedantic]
Item.c:22:8: error: ‘struct cheque’ has no member named ‘refc’
Code:
#ifndef _ITEM_
#define _ITEM_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* A chave pela qual se arruma os elementos e a refc*/
#define key (a) (a != NULL ? a->refc : "")
#define less (a,b) (strcmp (a,b)<0)
#define eq(a,b) (strcmp (a,b) == 0)
#define NULLitem NULL
typedef long int* Key; /* Definir a chave, ponteiro */
typedef struct cheque { /* Nome da estrutura */
int valor
long int refe
long int refb
long int* refc
}*Item; /* O Item vai ser um ponteiro para a estrutura */
Item newItem (int valor, long int refe, long int refb, long int* refc);
void deleteItem (Item a);
void visitItem (Item a);
#endif