Policy Based Data structure using pair

typedef tree<pair<int,int>, null_type, less<pair<int,int>>, rb_tree_tag,
tree_order_statistics_node_update>
PBDS;

int main(){

PBDS st;

//{value,index}
st.insert({1,0});
st.insert({10,1});
st.insert({15,2});
st.insert({9,3});
st.insert({07,4});
st.insert({1,5});

cout << st.order_of_key({5,6}) << endl; // line 1
cout << st.order_of_key({7,4}) << endl;// line 2

Why am i getting an error in line 2 and how to get desired result?

hi @akashagarwal1321
kindly save ur code on coding blocks ide and send link…

1 Like

I got the solution.
Thank you :slight_smile:

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.