diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-04-15 09:28:09 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-04-15 09:29:39 +0200 |
| commit | 52a866baba3cbb05ecf0be88f1b50991b4a26b52 (patch) | |
| tree | 70d32f262c8faddce90ce71cce046019da8b10dd /cpp08/ex00/main.cpp | |
| parent | 7ac812044bfe771178752a52d70b18bb297c1891 (diff) | |
| download | piscine_cpp-52a866baba3cbb05ecf0be88f1b50991b4a26b52.tar.gz piscine_cpp-52a866baba3cbb05ecf0be88f1b50991b4a26b52.tar.bz2 piscine_cpp-52a866baba3cbb05ecf0be88f1b50991b4a26b52.zip | |
cpp08 probably done, ex02 has a useless file in this implementation?
Diffstat (limited to 'cpp08/ex00/main.cpp')
| -rw-r--r-- | cpp08/ex00/main.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/cpp08/ex00/main.cpp b/cpp08/ex00/main.cpp new file mode 100644 index 0000000..8824f99 --- /dev/null +++ b/cpp08/ex00/main.cpp @@ -0,0 +1,46 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* main.cpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/15 05:57:10 by charles #+# #+# */ +/* Updated: 2020/04/15 06:47:52 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <iostream> +#include <vector> +#include <list> +#include <deque> +#include "easyfind.hpp" + +int main() +{ + int a[] = {10, 20, 30, 40, 50, 60}; + std::vector<int> b(a, a + 6); + std::list<int> c(a, a + 6); + std::deque<int> d(a, a + 6); + + std::cout << (easyfind(b, 10) != b.end()) << std::endl; + std::cout << (easyfind(c, 20) != c.end()) << std::endl; + std::cout << (easyfind(d, 30) != d.end()) << std::endl; + std::cout << (easyfind(b, 40) != b.end()) << std::endl; + std::cout << (easyfind(c, 50) != c.end()) << std::endl; + std::cout << (easyfind(d, 60) != d.end()) << std::endl; + + std::cout << *easyfind(b, 10) << std::endl; + std::cout << *easyfind(c, 20) << std::endl; + std::cout << *easyfind(d, 30) << std::endl; + std::cout << *easyfind(b, 40) << std::endl; + std::cout << *easyfind(c, 50) << std::endl; + std::cout << *easyfind(d, 60) << std::endl; + + + std::cout << (easyfind(b, 70) != b.end()) << std::endl; + std::cout << (easyfind(c, 80) != c.end()) << std::endl; + std::cout << (easyfind(d, 90) != d.end()) << std::endl; + + return 0; +} |
