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
|
#define BE_TORTUE_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
class Tortue{
|
class Tortue{
|
||||||
private:
|
private:
|
||||||
|
@ -41,6 +42,9 @@ public:
|
||||||
|
|
||||||
std::string getInfo();
|
std::string getInfo();
|
||||||
static void delete1();
|
static void delete1();
|
||||||
|
|
||||||
|
friend std::ostream &operator<<(std::ostream &os, const Tortue &tortue);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //BE_TORTUE_H
|
#endif //BE_TORTUE_H
|
||||||
|
|
|
@ -138,5 +138,10 @@ void Tortue::delete1() {
|
||||||
--nbTortue;
|
--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) {}
|
Tortue::ExceptionDate::ExceptionDate(int id) : id(id) {}
|
||||||
|
|
|
@ -61,7 +61,7 @@ void Board::loop() {
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
TemperatureManagement();
|
TemperatureManagement();
|
||||||
PressureManagement();
|
PressureManagement();
|
||||||
|
cout << tortues->back() << endl;
|
||||||
|
|
||||||
if (menu->getId() == 0 && menu->displayDefault(temperature->getValue(),
|
if (menu->getId() == 0 && menu->displayDefault(temperature->getValue(),
|
||||||
pressure->getValue(),
|
pressure->getValue(),
|
||||||
|
|
Loading…
Reference in a new issue