cpp/CPP08/ex00/easyfind.hpp
2024-12-04 17:29:31 +01:00

16 lines
302 B
C++

#pragma once
#include <vector>
#include <list>
#include <iostream>
#include <algorithm>
template <typename T>
void easyfind (T t, int toFind) {
if (std::find(t.begin(), t.end(), toFind) != t.end())
std::cout << "It's found !" << std::endl;
else
std::cout << "It's not found !" << std::endl;
}