Ciao a tutti
Sto compilando un mio programma e in fase di compilazione dà i seguenti errori:
codice:
warning: incompatible implicit declaration of built-in function ‘malloc'
relativo all'istruzione: header *h=(header *)malloc(sizeof(header));
codice:
error: invalid type argument of ‘->’
una serie di errori di questo tipo. Avendo una struttura definita in questo modo
typedef struct{
char name[DBF_NAME_LENGTH+1];
short NumCampi;
long NumRecords;
short dimHeader;
short dimRecord;
long timestamp;
campi campo[MAX_NUM_FIELDS];
}header;
ho fatto varie assegnazioni del tipo
h->campo[i]->fieldtype=(uint16_t) htons(h->campo[i]->fieldtype);
codice:
warning: passing argument 1 of ‘strcat’ makes pointer from integer without a cast
relativo all'istruzione strcat(Name[strlen(Name)-4],DBF_EXTENSION);
Che posso fare?