36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/04/17 20:26:58 by aortigos #+# #+# */
|
|
/* Updated: 2026/04/21 21:54:47 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "easyfind.hpp"
|
|
|
|
int main()
|
|
{
|
|
std::vector<int> arr;
|
|
|
|
arr.push_back(5);
|
|
arr.push_back(4);
|
|
arr.push_back(3);
|
|
arr.push_back(2);
|
|
|
|
try {
|
|
std::cout << *easyfind(arr, 4) << std::endl;
|
|
} catch (std::exception &e) {
|
|
std::cout << "Not found" << std::endl;
|
|
}
|
|
try {
|
|
std::cout << *easyfind(arr, 99) << std::endl;
|
|
} catch (std::exception &e) {
|
|
std::cout << "Not found" << std::endl;
|
|
}
|
|
|
|
return (0);
|
|
} |