Update main.cpp

main
Matis MAZINGUE 3 years ago
parent 7a347b1915
commit 92f0dc80d8

@ -6,6 +6,7 @@ using namespace std;
using namespace reseau;
int main(){
menu();
Personne p1{"Bernard","Tapie","0612345701"};
Personne p2{"Lionel","Pessi","0608345702"};
Personne p3{"Pristiano","Penaldo","0620345703"};
@ -40,3 +41,92 @@ int main(){
// map<Personne,listeContact> m {{p1,[p2,p6]},{}}
}
void menu(){
int choix, choix2, choix3;
string nom,prenom,numtel,message;
while(choix!=0){
cout <<"Créer une personne(1) S'identifier(2) exit(3)\n"; #Menu1
cin >> choix;
switch(choix) {
case 1 :
cout << endl << "Rentrez les informations suivantes pour créer une personne : \nNom : \nPrenom : \nNuméro de téléphone : \n";
cin >> nom >> prenom >> numtel ;
const Personne *p = new Personne(nom,prenom,numtel);
const Contact *c = new Contact(Personne);
break;
case 2 :
cout << endl << "Identifiez-vous : \nNom : \n";
cin >> nom ;
if(rechercher(nom)==true){
cout <<"Démarrer(1) Édition(2) retour(3)\n"; #Menu2
cin >> choix2;
while(choix2!=0){
switch(choix2) {
case 1 :
cout <<"MENU DÉMARRER\n" << "envoyerMessage afficherMessage afficherContact rechercher retour\n"; #MenuDémarrer
cin >> choix;
switch(choix) {
case 1 :
cout << "À qui voulez-vous l'envoyer\n Nom : \n Message : \n";
cin >> nom >> message;
rechercherPers(nom).envoyerMessage(nom,message);
case 2 :
afficherMessage();
break;
case 3 :
cout << rechercherPers(nom).lesContacts << endl;
break;
case 4 :
cout << rechercherPers(nom).lesContacts << endl;
break;
case 5 :
menu();
cout << nom;
break;
}
case 2 :
cout <<"MENU ÉDITION\n" << "ajouterContact supprimerContact rechercher retour\n"; #MenuÉdition
cin >> choix;
switch(choix) {
case 1 :
c1.ajouterContact(p1);
case 2 :
cout << endl << "donner chiffre d'affaire : ";
cin >> CA ;
const Employe *e = new Representant(nom,prenom,date,CA);
break;
}
case 3 :
menu();
cout << 2 << nom;
break;
}
}
}
else menu();
break;
case 3 :
return;
break;
}
}
}

Loading…
Cancel
Save