Comment sauvegarder cette stucture dans un fichier texte
et ensuite pouvoir ouvrir ce fichier texte pour le placer dans
la stucture tout en utilisant CreateFile, ReadFile, WriteFile et CloseHandle.
voici ma structure
typedef struct tagMATCH
{
char equipe[50];
int jouer;
int gagner;
int nu;
int perdu;
int pour;
int contre;
int diff;
int poin;
}MATCH;
MATCH rgMatch[ ] =
{
{"EQUIPE1", 0, 0, 0, 0, 0, 0, 5, 20},
{"EQUIPE2", 0, 0, 0, 0, 0, 0, 10, 14},
{"EQUIPE3", 0, 0, 0, 0, 0, 0, 15, 40},
{"EQUIPE4", 0, 0, 0, 0, 0, 0, 8, 30},
{"EQUIPE5", 0, 0, 0, 0, 0, 0, 0, 33},
{"EQUIPE6", 0, 0, 0, 0, 0, 0, 0, 10},
{"EQUIPE7", 0, 0, 0, 0, 0, 0, -3, 18},
{"EQUIPE8", 0, 0, 0, 0, 0, 0, 0, 36},
{"EQUIPE9", 0, 0, 0, 0, 0, 0, 0, 42},
{"EQUIPE10", 0, 0, 0, 0, 0, 0, 0, 13},
{"EQUIPE11", 0, 0, 0, 0, 0, 0, 4, 18},
{"EQUIPE12", 0, 0, 0, 0, 0, 0, 0, 23},
{"EQUIPE13", 0, 0, 0, 0, 0, 0, 0, 16},
{"EQUIPE14", 0, 0, 0, 0, 0, 0, 9, 35},
{"EQUIPE15", 0, 0, 0, 0, 0, 0, 5, 17},
{"EQUIPE16", 0, 0, 0, 0, 0, 0, 0, 30},
{"EQUIPE17", 0, 0, 0, 0, 0, 0, 0, 39},
{"EQUIPE18", 0, 0, 0, 0, 0, 0, 0, 17},
{"EQUIPE19", 0, 0, 0, 0, 0, 0, 0, 15},
{"EQUIPE20", 0, 0, 0, 0, 0, 0, 0, 26},
{"EQUIPE21", 0, 0, 0, 0, 0, 0, 0, 40},
{"EQUIPE22", 0, 0, 0, 0, 0, 0, 0, 14},
{"EQUIPE23", 0, 0, 0, 0, 0, 0, 0, 0},
{"EQUIPE24", 0, 0, 0, 0, 0, 0, 0, 0},
};