diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-12-17 14:15:34 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-12-17 14:15:34 +0100 |
| commit | aa3ecdd6346b40ab53bd04861ca42cd6de09ab38 (patch) | |
| tree | c5a15ad2c86d7d0c8f7f457b8393bdeef5cf267e /cpp08/ex01/main.cpp | |
| parent | 4f005e4cf461041e0f46a454f6b215cdf20cbf60 (diff) | |
| download | piscine_cpp-master.tar.gz piscine_cpp-master.tar.bz2 piscine_cpp-master.zip | |
Diffstat (limited to 'cpp08/ex01/main.cpp')
| -rw-r--r-- | cpp08/ex01/main.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp08/ex01/main.cpp b/cpp08/ex01/main.cpp index c702748..a2fe3ba 100644 --- a/cpp08/ex01/main.cpp +++ b/cpp08/ex01/main.cpp @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/15 06:50:51 by charles #+# #+# */ -/* Updated: 2020/12/15 13:52:20 by cacharle ### ########.fr */ +/* Updated: 2020/12/17 14:11:02 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,6 +32,20 @@ int main() std::cout << std::endl; { + std::cout << "======================== NOT FIRST =======================" << std::endl; + Span sp = Span(5); + sp.addNumber(5); + sp.addNumber(3); + sp.addNumber(17); + sp.addNumber(10); + sp.addNumber(11); + std::cout << sp.shortestSpan() << std::endl; + std::cout << sp.longestSpan() << std::endl; + } + + std::cout << std::endl; + + { std::cout << "======================== DEFAULT CONSTRUCTOR =======================" << std::endl; Span p; try { p.addNumber(0); } catch (std::exception &e) { std::cout << e.what() << std::endl; } |
