|
|
|
@ -51,12 +51,23 @@ bool Contact::rechercher(const Personne& unContact){
|
|
|
|
|
lesContacts.sort();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// bool Contact::supprimerContact(const Personne& unContact){
|
|
|
|
|
// //remove
|
|
|
|
|
// }
|
|
|
|
|
bool Contact::supprimerContact(const Personne& unContact){
|
|
|
|
|
list<const Personne*>::iterator it = find(lesContacts.begin(), lesContacts.end(), &unContact);
|
|
|
|
|
if(it!=lesContacts.end()){
|
|
|
|
|
lesContacts.erase(it);
|
|
|
|
|
cout << "Contact " << unContact << " supprimé\n";
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
cout << "Erreur : le contact n'existe pas\n";
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// string envoyerMessage(std::string texte, Personne p)
|
|
|
|
|
void Contact::envoyerMessage(std::string texte, Personne p){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// string recevoirMessage(std::string texte, Personne p)
|
|
|
|
|
|
|
|
|
|