「🎉」 init: hello world !
This commit is contained in:
74
ex01/main.cpp
Normal file
74
ex01/main.cpp
Normal file
@@ -0,0 +1,74 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* main.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/19 01:13:45 by mmoussou #+# #+# */
|
||||
/* Updated: 2025/06/29 20:48:03 by mmoussou ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "Form.hpp"
|
||||
#include "Bureaucrat.hpp"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
try
|
||||
{
|
||||
Form test("test form", 175, 15);
|
||||
std::cout << test << std::endl;
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << "Exception : " << e.what() << std::endl;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
try
|
||||
{
|
||||
Form test("test form", 120, 10);
|
||||
Form test2(test);
|
||||
Bureaucrat tester("john", 1);
|
||||
std::cout << test << std::endl;
|
||||
std::cout << test2 << std::endl;
|
||||
tester.signForm(test2);
|
||||
std::cout << test << std::endl;
|
||||
std::cout << test2 << std::endl << std::endl;
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << "Exception : " << e.what() << std::endl;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
try
|
||||
{
|
||||
Form test;
|
||||
Bureaucrat tester;
|
||||
|
||||
std::cout << test << std::endl;
|
||||
tester.signForm(test);
|
||||
std::cout << test << std::endl;
|
||||
tester.signForm(test);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << "Exception : " << e.what() << std::endl;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
try
|
||||
{
|
||||
Form test("some form", 149, 149);
|
||||
Bureaucrat tester;
|
||||
|
||||
std::cout << test << std::endl;
|
||||
tester.signForm(test);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << "Exception : " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user