end 01 06

This commit is contained in:
kinou-p 2022-06-21 23:53:56 +02:00
parent 0dea92d24f
commit 1adb025a09
2 changed files with 27 additions and 4 deletions

View File

@ -6,13 +6,13 @@
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/06/21 23:38:45 by apommier #+# #+# #
# Updated: 2022/06/21 23:40:23 by apommier ### ########.fr #
# Updated: 2022/06/21 23:46:38 by apommier ### ########.fr #
# #
# **************************************************************************** #
NAME = harlFilter
SRCS = main.cpp\
Harl.cpp
OBJS = ${SRCS:.cpp=.o}
CC = c++

View File

@ -6,8 +6,31 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/21 23:40:41 by apommier #+# #+# */
/* Updated: 2022/06/21 23:40:55 by apommier ### ########.fr */
/* Updated: 2022/06/21 23:52:51 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
#include "Harl.hpp"
#include "Harl.hpp"
int main(int ac, char **av)
{
Harl harl;
bool freeHarl = 0;
std::string levelTab[4] = {"DEBUG", "INFO", "WARNING", "ERROR"};
if (ac != 2)
return (0);
for (int j = 0; j < 4; j++)
{
if (av[1] == levelTab[j])
freeHarl = 1;
if (freeHarl == 1)
{
while (j < 4)
{
harl.complain(levelTab[j]);
j++;
}
}
}
}