Non en fait on ne peux pas allouer une fois pour toute puisque ma fonction c est appelée à chaque enregistrement par un autre programme(4D).
Donc l'allocation doit se faire à chaque appel.
Ma structure est comme suit:
typedef struct {
int s400id;
int s400RealId;
char timeStamp[150];
char name[25];
char birthName[25];
char firstName[15];
char birthDate[8];
char nationalId[20];
char sex;
char nationality;
char address1[40];
char address2[40];
char zipCode[5];
char city[25];
char country[20];
char tel[20];
}IPLongIdentity,*LPID;
Mon allocation est comme suit:
lpid=(IPLongIdentity*)malloc(sizeof(IPLongIdentity));