I'd like to save a struct in a file. I'd like to realize a function which makes this work. I tried this code but it didn't work.
struct utilisateur   // enregestrement pour sauvegarder les details de l utilisateur
{
 char nom[20];
 char prenom[20];
 int place;
 char depart[20];
 char arrive[20];
 char sexe;
 int nwagon;
};
struct utilisateur utilis;
struct utilisateur *Table[48];
void crea_fich(struct utilisateur *Tutilis)
// creation un fichier, vous introduiez le nom, et le sotcker par enreg
{
    FILE *f;
    if (f!==0)
    {
         printf("error in the name of file \n");
         exit(1);
    }
    if (f=fopen(futilis,"w")==Null){
         fprint("We can't creat file \n");
         exit(1);
    }
    else{
        f=fopen("futilis.dat","wb");
        fwrite(Tutilis ,sizeof(utilisateur),1,f);
    }
}