first and second are the key words?
Sanjays new job
@ashnagalhotra
Hello ashna
first is used to get first entry of pair.
second is used to get second entry of pair.
for example if p is pair defined as
pair<int,int> p={2,4};
and
if u will do cout<<p.first then 2 will print (first entry)
if u will do cout<<p.second then 4 will print (second entry)
I hope u find this helpful
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.