「🎉」 init: started span
This commit is contained in:
5
.clang-format
Normal file
5
.clang-format
Normal file
@ -0,0 +1,5 @@
|
||||
UseTab: Always
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
AlignConsecutiveDeclarations: true
|
||||
ConstructorInitializerIndentWidth: 4
|
60
ex01/Makefile
Normal file
60
ex01/Makefile
Normal file
@ -0,0 +1,60 @@
|
||||
# **************************************************************************** #
|
||||
# #
|
||||
# ::: :::::::: #
|
||||
# Makefile :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2024/10/25 16:09:27 by adjoly #+# #+# #
|
||||
# Updated: 2025/04/14 19:06:23 by adjoly ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
SHELL = bash
|
||||
|
||||
NAME = easyfind
|
||||
|
||||
CC = c++
|
||||
|
||||
OBJSDIR = obj/
|
||||
|
||||
SRCS = $(shell find . -name '*.cpp')
|
||||
|
||||
OBJS = $(addprefix $(OBJSDIR), $(SRCS:.cpp=.o))
|
||||
|
||||
FLAGS = -Wall -Werror -Wextra -std=c++98 -MMD -MP
|
||||
|
||||
RED = \033[0;31m
|
||||
GREEN = \033[0;32m
|
||||
YELLOW = \033[1;33m
|
||||
PURPLE = \e[0;35m
|
||||
NC = \033[0m
|
||||
DELETE = \x1B[2K\r
|
||||
|
||||
ifeq ($(VERBOSE),true)
|
||||
FLAGS += -D VERBOSE
|
||||
endif
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
$(NAME): $(OBJS)
|
||||
@$(CC) $(FLAGS) -I . $(OBJS) -o $(NAME)
|
||||
@printf "$(YELLOW)「✨」($(NAME)) Program compiled\n"
|
||||
|
||||
$(OBJSDIR)%.o: %.cpp
|
||||
@mkdir -p $(@D)
|
||||
@$(CC) $(FLAGS) -I . -c $< -o $@
|
||||
@printf "$(DELETE)$(GREEN)「🔨」($<) Object compiled\n"
|
||||
|
||||
clean:
|
||||
@rm -f $(OBJS)
|
||||
@printf "$(DELETE)$(RED)「🗑️」($(OBJS)) Object deleted\n"
|
||||
|
||||
fclean: clean
|
||||
@rm -f $(NAME)
|
||||
@rm -Rf $(OBJSDIR)
|
||||
@printf "$(RED)「🗑️」($(NAME)) Program deleted\n"
|
||||
|
||||
re: fclean all
|
||||
|
||||
.PHONY: clean fclean all re
|
0
ex01/Span.cpp
Normal file
0
ex01/Span.cpp
Normal file
25
ex01/Span.hpp
Normal file
25
ex01/Span.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Span.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/14 19:54:33 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/14 20:09:51 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
class Span {
|
||||
public:
|
||||
Span(unsigned int);
|
||||
~Span(void);
|
||||
|
||||
void addNumber(int);
|
||||
|
||||
int shortestSpan(void);
|
||||
int longestSpan(void);
|
||||
private:
|
||||
};
|
0
ex01/main.cpp
Normal file
0
ex01/main.cpp
Normal file
Reference in New Issue
Block a user