Otóż ja chciałbym, by na pair secie użyć find, ale w taki sposób, by szukać względem elementu first, ale żeby program wypisał element second. Bo np. jak chcę wyciągnąć .begin() to mogę to zrobić za pomocą:
cout<<S.begin()->second;
A czy da się zrobić to samo tylko z findem? Jeśli tak to co mam wpisać?
#include <iostream>
#include <set>
using namespace std;
set<pair<int,int>>S;
int main()
{
S.insert({1,11});
S.insert({2,22});
S.insert({3,33});
S.insert({4,44});
S.insert({5,55});
cout<<*S.find(5)->second;
/// Tutaj chcialbym by znalazl
/// element 5 w secie first i wypiasal
/// jego element second, w tym przypadku 55.
return 0;
}