From 52a866baba3cbb05ecf0be88f1b50991b4a26b52 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 15 Apr 2020 09:28:09 +0200 Subject: cpp08 probably done, ex02 has a useless file in this implementation? --- cpp08/ex01/span.hpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cpp08/ex01/span.hpp (limited to 'cpp08/ex01/span.hpp') diff --git a/cpp08/ex01/span.hpp b/cpp08/ex01/span.hpp new file mode 100644 index 0000000..0af8453 --- /dev/null +++ b/cpp08/ex01/span.hpp @@ -0,0 +1,37 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* span.hpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: charles +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/15 06:55:07 by charles #+# #+# */ +/* Updated: 2020/04/15 07:19:46 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef SPAN_HPP +# define SPAN_HPP + +# include + +class Span +{ +public: + Span(); + Span(Span const& other); + void operator=(Span const& other); + ~Span(); + + Span(unsigned int n); + void addNumber(int x); + int shortestSpan() const; + int longestSpan() const; + +private: + int* m_under; + unsigned int m_size; + unsigned int m_fillIndex; +}; + +#endif -- cgit