1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
#ifndef ENUMSTRUC_H
#define ENUMSTRUC_H
//création d'un enum Section
typedef enum Section
{
Informatique,
Comptabilite,
Fleuriste,
Menuiserie,
Diplome,
Abandon
}Section;
//création d'un enum Année
typedef enum Annee
{
Premiere = 1,
Deuxieme,
Troisieme,
Quatrieme,
Cinquieme,
Sixieme,
DiplomeAbandon
}Annee;
//création d'énum par section pour le nom des différentes branches par sections
typedef enum BrInfo
{
Reseau,
Programmation,
Analyse
}BrInfo;
typedef enum BrCompta
{
ECommerce,
Droit,
Mathematique
}BrCompta;
typedef enum BrFleuriste
{
Gestion,
Montage,
Orticulture
}BrFleuriste;
typedef enum BrMenuiserie
{
Plan,
Travail_du_bois,
gestion
}BrMenuiserie;
//création d'un enum Etat pour dire si un Etudiant est actif ou pas
typedef enum Etat
{
Non_actif,
Actif
}
Etat;
typedef struct Branches
{
char branche1[25];
char branche2[25];
char branche3[25];
float coteBranche1;
float coteBranche2;
float coteBranche3;
float maxBranche1;
float maxBranche2;
float maxBranche3;
}Branches;
//création d'une structure Etudiant
typedef struct Etudiant Etudiant;
struct Etudiant
{
short id;
char nom[25];
char prenom[25];
Etat status;
Section section;
Annee annee;
Branches * branche1;//pointeurs vers structure branches
Branches * branche2;
Branches * branche3;
float total;
Etudiant * next;//pointeur vers la structure Etudiant suivante
};
#endif // ENUMSTRUC_H |
Partager