first save for ex02

This commit is contained in:
lfirmin
2025-11-16 18:01:57 +01:00
parent bbeb07c275
commit 93a5094a0a
8 changed files with 425 additions and 12 deletions
+1 -1
View File
@@ -65,4 +65,4 @@ std::ostream &operator<<(std::ostream &os, Form const &form)
{
os << "Name: " << form.getName() << " Signed: " << form.getSigned() << " SiGrade: " << form.getSignGrade() << " ExGrade: " << form.getExecuteGrade() << std::endl;
return (os);
}
}
+11 -11
View File
@@ -24,7 +24,7 @@ int main(void)
}
catch(const std::exception &e)
{
std::cerr << "Exception attrapée: " << e.what() << std::endl;
std::cerr << "Exception catch: " << e.what() << std::endl;
}
try
@@ -33,7 +33,7 @@ int main(void)
}
catch(const std::exception &e)
{
std::cerr << "Exception attrapée: " << e.what() << std::endl;
std::cerr << "Exception catch: " << e.what() << std::endl;
}
std::cout << "\033[32m" << std::endl << "Test augmentation" << "\033[0m" << std::endl;
@@ -45,17 +45,17 @@ int main(void)
}
catch(const std::exception& e)
{
std::cerr << "Exception attrapée: " << e.what() << std::endl;
std::cerr << "Exception catch: " << e.what() << std::endl;
}
std::cout << robert;
try
{
robert.incrementGrade();
}
catch(const std::exception& e)
{
std::cerr << "Exception attrapée: " << e.what() << std::endl;
std::cerr << "Exception catch: " << e.what() << std::endl;
}
std::cout << robert;
@@ -70,17 +70,17 @@ int main(void)
}
catch(const std::exception& e)
{
std::cerr << "Exception attrapée: " << e.what() << std::endl;
std::cerr << "Exception catch: " << e.what() << std::endl;
}
std::cout << thomas;
try
{
thomas.decrementGrade();
}
catch(const std::exception& e)
{
std::cerr << "Exception attrapée: " << e.what() << std::endl;
std::cerr << "Exception catch: " << e.what() << std::endl;
}
std::cout << thomas;
@@ -91,12 +91,12 @@ int main(void)
Bureaucrat mr_lent;
Bureaucrat mr_identite("MR_IDENTITE", 100);
std::cout << formulaire_id;
mr_lent.signForm(formulaire_id);
std::cout << formulaire_id;
mr_identite.signForm(formulaire_id);
std::cout << formulaire_id;
return (0);
}
}