/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/23 14:01:11 by adjoly #+# #+# */ /* Updated: 2025/04/03 15:49:50 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #include "Bureaucrat.hpp" #include "AForm.hpp" #include "ShrubberyCreationForm.hpp" #include int main(void) { Bureaucrat knl("Kanel", 10); knl--; std::cout << knl << std::endl; knl++; std::cout << knl << std::endl; try { knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; knl++; } catch (const std::exception &e) { std::cerr << "Error : " << e.what() << std::endl; } ShrubberyCreationForm s; try { s.beSigned(knl); } catch (std::exception &e) { knl.executeForm(s); std::cerr << "Error : " << e.what() << std::endl; } std::cout << knl << std::endl; }