How to access elements of a pair set in C++
<p>I have a set. It is of the form <code>set&lt;pair&lt;string,int&gt; &gt; stockSet</code>
I want find if the above set has an entry for a given string that is first element. 
Also to find the value of 2nd part of the pair, that is <code>int</code> given the first element of the pair which is <code>string</code>.</p>

<p>I know how to do it with map and also single element set. But I am unable to figure out how to do this, need help with syntax.</p>