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
|
#ifndef FAMILLE_H
#define FAMILLE_H
#include <iostream>
#include<string>
#include "famille.cpp"
class carnet{
public:
carnet();
bool avant(const string& nom,const string& nom2);
famille crt(string nom); // x
void ajouter_famille(string nom, string adresse, string tel);
famille get_premiere_famille(); // x
private:
famille*c_premier;
famille*c_dernier;
};
class famille{
public:
famille();
~famille();
famille(string nom, string adresse, string tel);
void ajouter_personne(string prenom, string mail, string gsm);
void modifier_famille();
void afficher_famille();
personne get_premiere_personne();
private:
string f_nom;
string f_adresse;
string f_tel;
personne*f_premier;
personne*f_dernier;
famille*f_suivant;
famille*f_precedant;
friend class carnet;
};
class personne{
public:
personne();
personne(string prenom, string mail, string gsm);
~personne();
void modifier_personne();
void afficher_personne();
private:
string p_prenom;
string p_mail;
string p_gsm;
personne*p_precedant;
personne*p_suivant;
friend class famille;
};
#endif |
Partager