Update main.cpp

main
Joan PIERRON 3 years ago
parent 5fa331db4f
commit 0f7ef391e2

@ -24,22 +24,38 @@ int main(){
Personne p13{"Morgane"}; Personne p13{"Morgane"};
Personne p14{"Thibault"}; Personne p14{"Thibault"};
Personne p15{"Gwen"}; Personne p15{"Gwen"};
list<Contact*> Contacts;
// cout << "----------\n"; // cout << "----------\n";
Contact c1{p1}; Contact c1{p1};
Contacts.push_back(&c1);
Contact c2{p2}; Contact c2{p2};
Contacts.push_back(&c2);
Contact c3{p3}; Contact c3{p3};
Contacts.push_back(&c3);
Contact c4{p4}; Contact c4{p4};
Contacts.push_back(&c4);
Contact c5{p5}; Contact c5{p5};
Contacts.push_back(&c5);
Contact c6{p6}; Contact c6{p6};
Contacts.push_back(&c6);
Contact c7{p7}; Contact c7{p7};
Contacts.push_back(&c7);
Contact c8{p8}; Contact c8{p8};
Contacts.push_back(&c8);
Contact c9{p9}; Contact c9{p9};
Contacts.push_back(&c9);
Contact c10{p10}; Contact c10{p10};
Contacts.push_back(&c10);
Contact c11{p11}; Contact c11{p11};
Contacts.push_back(&c11);
Contact c12{p12}; Contact c12{p12};
Contacts.push_back(&c12);
Contact c13{p13}; Contact c13{p13};
Contacts.push_back(&c13);
Contact c14{p14}; Contact c14{p14};
Contacts.push_back(&c14);
Contact c15{p15}; Contact c15{p15};
Contacts.push_back(&c15);
// cout << "----------\n"; // cout << "----------\n";
c1.ajouterContact(p2); c1.ajouterContact(p2);
c1.ajouterContact(p5); c1.ajouterContact(p5);
@ -47,6 +63,7 @@ int main(){
c3.ajouterContact(p1); c3.ajouterContact(p1);
c3.ajouterContact(p2); c3.ajouterContact(p2);
c4.ajouterContact(p5); c4.ajouterContact(p5);
c4.ajouterContact(p6);
c5.ajouterContact(p4); c5.ajouterContact(p4);
c6.ajouterContact(p7); c6.ajouterContact(p7);
c6.ajouterContact(p9); c6.ajouterContact(p9);
@ -147,35 +164,35 @@ int main(){
break; break;
case 2: case 2:
if(persChoix==1) if(persChoix==1)
c1.afficherContactIndirect(); c1.afficherContactIndirect(Contacts);
if(persChoix==2) if(persChoix==2)
c2.afficherContactIndirect(); c2.afficherContactIndirect(Contacts);
if(persChoix==3) if(persChoix==3)
c3.afficherContactIndirect(); c3.afficherContactIndirect(Contacts);
if(persChoix==4) if(persChoix==4)
c4.afficherContactIndirect(); c4.afficherContactIndirect(Contacts);
if(persChoix==5) if(persChoix==5)
c5.afficherContactIndirect(); c5.afficherContactIndirect(Contacts);
if(persChoix==6) if(persChoix==6)
c6.afficherContactIndirect(); c6.afficherContactIndirect(Contacts);
if(persChoix==7) if(persChoix==7)
c7.afficherContactIndirect(); c7.afficherContactIndirect(Contacts);
if(persChoix==8) if(persChoix==8)
c8.afficherContactIndirect(); c8.afficherContactIndirect(Contacts);
if(persChoix==9) if(persChoix==9)
c9.afficherContactIndirect(); c9.afficherContactIndirect(Contacts);
if(persChoix==10) if(persChoix==10)
c10.afficherContactIndirect(); c10.afficherContactIndirect(Contacts);
if(persChoix==11) if(persChoix==11)
c11.afficherContactIndirect(); c11.afficherContactIndirect(Contacts);
if(persChoix==12) if(persChoix==12)
c12.afficherContactIndirect(); c12.afficherContactIndirect(Contacts);
if(persChoix==13) if(persChoix==13)
c13.afficherContactIndirect(); c13.afficherContactIndirect(Contacts);
if(persChoix==14) if(persChoix==14)
c14.afficherContactIndirect(); c14.afficherContactIndirect(Contacts);
if(persChoix==15) if(persChoix==15)
c15.afficherContactIndirect(); c15.afficherContactIndirect(Contacts);
break; break;
} }
} }
@ -202,21 +219,21 @@ int main(){
break; break;
case 2: case 2:
c1.afficherContactIndirect(); c1.afficherContactIndirect(Contacts);
c2.afficherContactIndirect(); c2.afficherContactIndirect(Contacts);
c3.afficherContactIndirect(); c3.afficherContactIndirect(Contacts);
c4.afficherContactIndirect(); c4.afficherContactIndirect(Contacts);
c5.afficherContactIndirect(); c5.afficherContactIndirect(Contacts);
c6.afficherContactIndirect(); c6.afficherContactIndirect(Contacts);
c7.afficherContactIndirect(); c7.afficherContactIndirect(Contacts);
c8.afficherContactIndirect(); c8.afficherContactIndirect(Contacts);
c9.afficherContactIndirect(); c9.afficherContactIndirect(Contacts);
c10.afficherContactIndirect(); c10.afficherContactIndirect(Contacts);
c11.afficherContactIndirect(); c11.afficherContactIndirect(Contacts);
c12.afficherContactIndirect(); c12.afficherContactIndirect(Contacts);
c13.afficherContactIndirect(); c13.afficherContactIndirect(Contacts);
c14.afficherContactIndirect(); c14.afficherContactIndirect(Contacts);
c15.afficherContactIndirect(); c15.afficherContactIndirect(Contacts);
break; break;
} }
@ -233,7 +250,7 @@ int main(){
main(); main();
break; break;
} }
sleep_for(2s); sleep_for(8s);
system("clear"); system("clear");
main(); main();
break; break;

Loading…
Cancel
Save