Tfe

Ongi etorri tfe-ren webgunera...

Old stuff/ecole_etude_fac_de_pau/licence_3/genie-logiciel/td1/main.c

(Deskargatu)
#include "parking.h"
#include <stdio.h>
#include <stdlib.h>



int main()
{
    parking* park;
    vehicule vec;
    vehicule* vehic;
    place* pl;
    
    strcpy(vec.immatriculation,"1234AB64");
    
    park = initialiser_parking();
    
    if (occupee(park,&park->places[0]))
    {
	printf("<-- place occupee\n");
    }
    else{
	printf("--> Place libre\n");
    }
    
    park = se_garer(park, &park->places[0], &vec);

    pl = quelle_place(park,&vec);
    printf("Vehicule %s gare en %d\n",vec.immatriculation, pl->numero);

    vehic = quelle_vehicule(park,pl);
    printf("trouve le vehicule %s gare sur %d\n",vehic->immatriculation, pl->numero);
    
    park = quitter(park, &vec);
    
        
}