Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Init_Chantiers()
- {
- FILE *fp;
- _Chantiers pc;
- short cpt;
- fp = fopen(FICHIERCHANTIER, "rb");
- if(fp == NULL)
- {
- pc.numchantier = -1;
- pc.montant = 0;
- fp = fopen(FICHIERCHANTIER, "wb");
- for(cpt = 0; cpt < NB_CHANTIERS; cpt++)
- {
- pc.offsetsuiv = ftell(fp)+ sizeof(_Chantiers);
- fwrite(&pc,sizeof(_Chantiers),1,fp);
- }
- }
- fclose(fp);
- }
Advertisement
Add Comment
Please, Sign In to add comment