Set lowerbound fn not working

@POORVI_SAXENA, you are calling lowerbound function for set s which store value to type int not pair<int,int> (as you are passing make_pair(10,2)) so ,
instead of :

auto it= s.lower_bound(make_pair(10,2));
cout<<(*it).first<<" "<<(*it).second<<endl;

It should be :-

auto it= s1.lower_bound(make_pair(10,2));
cout<<(*it).first<<" "<<(*it).second<<endl;
1 Like