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
| #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>
typedef struct da{
int jour_sortie;
int jour_presetation;
int mois_sortie;
int mois_presentation;
int semaine_presentation;
int annee_presetation;
int annee_sortie;
}date;
typedef struct v
{
char act[25];
}t;
typedef struct p1
{
char j[10];
}p1;
p1 v[7];
typedef struct he{
int heure;
int minute;
int seconde;
}temps;
typedef struct fi{
char NomFilm[25];
char Realisateur[20];
date k1;
temps ptr;
char salle[10];
int Duree;
t acteur_Principaux[5];
struct fi *suivant;
}film;
film *F=NULL;
void AjoutFilm(char NomFilm[],char Realisateur[], int jour_sortie,int mois_sortie,int annee_sortie,int Duree,t AP[],char salle[])
{ date *k2;
int i;
film *p=NULL;
k2=(date*)malloc(sizeof(date));
p=(film*)malloc(sizeof(film));
strcpy(p->NomFilm,NomFilm);
strcpy(p->Realisateur,Realisateur);
p->(k2.jour_sortie)=jour_sortie;
p->(k2->mois_sortie)=mois_sortie;
p->(k2->annee_sortie)=annee_sortie;
p->Duree=Duree;
strcpy(p->salle,salle);
for(i=0;i<5;i++)
{
strcpy(p->(acteur_principaux[i].act),AP);
}
p->suivant=F;F=p;
} |
Partager