You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.5 KiB
60 lines
1.5 KiB
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdbool.h>
|
|
|
|
/*
|
|
------------------------------------------------------------------------
|
|
Prise en charge de l'OS pour le nettoyage de l'affichage
|
|
------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifdef _WIN32
|
|
#define clean system("cls");
|
|
#define color system("color 70");
|
|
void testColor(void);
|
|
#endif
|
|
|
|
#ifdef __linux__
|
|
#define clean system("clear")
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
------------------------------------------------------------------------
|
|
Les structures
|
|
------------------------------------------------------------------------
|
|
*/
|
|
typedef struct maillonDept
|
|
{
|
|
char nomDept[30];
|
|
char resp[30];
|
|
int nbP;
|
|
struct maillonDept *suiv;
|
|
}MaillonDept, *ListeDept;
|
|
|
|
// Utilise pour le tableau de pointeurs sur cette structure (pour Guillaume)
|
|
typedef struct
|
|
{
|
|
char nom[30];
|
|
ListeDept ldept;
|
|
}VilleIut;
|
|
|
|
|
|
/*
|
|
------------------------------------------------------------------------
|
|
Les structures
|
|
------------------------------------------------------------------------
|
|
*/
|
|
// listeDeparements.c
|
|
ListeDept ajouterEnTete(ListeDept ldept, char nomDept[], char resp[], int nbP);
|
|
ListeDept supprimerEnTete(ListeDept ldept);
|
|
ListeDept supprimer(ListeDept ldept, char nom[]);
|
|
ListeDept ajouterDept(ListeDept ldept, char nomDept[], char resp[], int nbP);
|
|
ListeDept listenouv();
|
|
bool vide(ListeDept ldept);
|
|
int longueur(ListeDept ldept);
|
|
void afficherListe(ListeDept ldept);
|
|
|
|
// iut.c
|