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

Latest commit

 

History

History
24 lines (17 loc) · 393 Bytes

insert.md

File metadata and controls

24 lines (17 loc) · 393 Bytes

insert

Description : This method is used to insert elements 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};

    // insert element in set
    mySet.insert(7);

    return 0;
}

Run Code