beta 1.0 + operator
This commit is contained in:
parent
e8096b9681
commit
5c3d503b30
3 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
#define BE_TORTUE_H
|
||||
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
|
||||
class Tortue{
|
||||
private:
|
||||
|
@ -41,6 +42,9 @@ public:
|
|||
|
||||
std::string getInfo();
|
||||
static void delete1();
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &os, const Tortue &tortue);
|
||||
|
||||
};
|
||||
|
||||
#endif //BE_TORTUE_H
|
||||
|
|
|
@ -138,5 +138,10 @@ void Tortue::delete1() {
|
|||
--nbTortue;
|
||||
}
|
||||
|
||||
ostream &operator<<(ostream &os, const Tortue &tortue) {
|
||||
os << "nom: " << tortue.nom << " naissance: " << tortue.naissance << " sexe: " << tortue.sexe;
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
Tortue::ExceptionDate::ExceptionDate(int id) : id(id) {}
|
||||
|
|
|
@ -61,7 +61,7 @@ void Board::loop() {
|
|||
for (i = 0; i < 10; i++) {
|
||||
TemperatureManagement();
|
||||
PressureManagement();
|
||||
|
||||
cout << tortues->back() << endl;
|
||||
|
||||
if (menu->getId() == 0 && menu->displayDefault(temperature->getValue(),
|
||||
pressure->getValue(),
|
||||
|
|
Loading…
Reference in a new issue