Starting ex03
This commit is contained in:
41
ex03/main.cpp
Normal file
41
ex03/main.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* main.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: hadi <hadi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/02/16 22:32:41 by hadi #+# #+# */
|
||||
/* Updated: 2026/02/18 00:15:46 by hadi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "Bureaucrat/Bureaucrat.hpp"
|
||||
#include "AForm/AForm.hpp"
|
||||
#include "ShrubberyCreationForm/ShrubberyCreationForm.hpp"
|
||||
#include "RobotomyRequestForm/RobotomyRequestForm.hpp"
|
||||
#include "PresidentialPardonForm/PresidentialPardonForm.hpp"
|
||||
|
||||
int main()
|
||||
{
|
||||
// Inicilizamos semilla de rand, necesario para
|
||||
// RobotomyRequestForm
|
||||
srand(time(NULL));
|
||||
|
||||
std::cout << "---- ex01 tests ----" << std::endl;
|
||||
RobotomyRequestForm form("home");
|
||||
|
||||
try {
|
||||
Bureaucrat angel("Angel", 1);
|
||||
|
||||
angel.executeForm(form);
|
||||
angel.signForm(form);
|
||||
angel.executeForm(form);
|
||||
} catch (std::exception &e) {
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
|
||||
std::cout << std::endl;
|
||||
|
||||
return (0);
|
||||
}
|
||||
Reference in New Issue
Block a user