Getting compile error

I’m getting compile error in code. Plz help.

hello @sukritbansal01
image

this is not correct, here in first argument u need to pass starting address and in second argument u need to pass ending address

Ok. So how can we pass the address of all first elements in the pairs?

p.begin() will give u starting address and p.end() will give u ending address

Still it’s giving error

Not the same error but some error

third argument should be pair of int,becuase ur vector is of pair

Is there any way I can get the address of first elements in each pair only, something like &p[j+1].first.begin()?

no lower bound will not work like that

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.