Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 400 Bytes

find.md

File metadata and controls

24 lines (18 loc) · 400 Bytes

insert

Description : This method is used to find a element in std::set.

Example :

//Run Code To Demonstrate use of set.size()
#include<iostream>
#include<set>

int main(){
    // Create a set object holding integers
    std::set<int> mySet {1,2,3,4,-5};

    if(mySet.find(1) != mySet.end())
        cout<< "1 found";
    else
        cout<< "Not found";

    return 0;
}