blob: 0af84536d750753b78bec4ec5b28cf9b3661902f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* span.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <algorithm>
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
|