Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Latest commit

 

History

History
21 lines (18 loc) · 606 Bytes

find_if_not.md

File metadata and controls

21 lines (18 loc) · 606 Bytes

find_if_not

Description : Returns the first element in the range [first, last) that satisfies specific criteria(searches for an element for which predicate q returns false).

Example:

    bool IsOdd (int i) {
        return ((i%2)==1);
    }

    int main(){
        std::vector<int> v{ 1, 2, 3, 4, 4, 3, 7, 8, 9, 10 };
        if(std::find_if_not(std::begin(v), std::end(v), IsOdd) != std::end(v)){
            std::cout <<"\n First Even Value";
        }
        else
            std::cout<<"No match !!";
        return 0;
    }

Run Code