Something went wrong. Try again.
A Tour of C++ for experienced programmers, as if C++26 is the only version that ever existed.
Something went wrong. Try again.
12345678910111213141516#include <iostream>#include <vector>#include <algorithm>#include <ranges>
int main() { std::vector<int> v = {1, 2, 3, 4, 5}; auto it = std::ranges::find(v, 3); if (it != v.end()) { std::cout << "found" << std::endl; } else { std::cout << "not found" << std::endl; } return 0;}