「✨」 feat: finished ex01
This commit is contained in:
26
ex01/main.cpp
Normal file
26
ex01/main.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* main.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/03 11:58:43 by adjoly #+# #+# */
|
||||
/* Updated: 2025/06/03 15:54:55 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <RPN.hpp>
|
||||
#include <exception>
|
||||
|
||||
int main(int ac, char **av) {
|
||||
if (ac > 1 && ac < 3) {
|
||||
try {
|
||||
rpn(av[1]);
|
||||
} catch(std::exception &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
} else {
|
||||
std::cerr << "Error" << std::endl;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user