c++: How to transform a map iterator which point to pair into a "regular" pair pointer
<p>those are the maps:</p>

<pre><code>multimap&lt;SortKey,T&gt; firstMap;
multimap&lt;SearchKey,pair&lt;SortKey,T&gt;*&gt; secondMap;


template &lt;class T,class SortKey, class SearchKey&gt; bool GarageDataBase&lt;T,SortKey,SearchKey&gt;::Add(T data,SortKey key1, SearchKey key2) 
{
 multimap&lt;SortKey,T&gt;::iterator it;
 it=(firstMap.insert(pair&lt;SortKey,T&gt;(key1,data)));
 pair&lt;SortKey,T&gt; *mizi=&amp;*it;

 secondMap.insert(pair&lt;SearchKey,pair&lt;SortKey,T&gt;*&gt;(key2,mizi));
 return true;
}
</code></pre>

<p>I am trying to insert a pair into the firstMap and get a pointer to this pair and insert it into the "second" field in the secondMap</p>

<p>so that i  could go into my firstMap from the secondmap.</p>

<pre><code>pair&lt;SortKey,T&gt; *mizi=&amp;*it;
</code></pre>

<p>this doesn't compile saying : </p>

<pre><code>error C2440: 'initializing' : cannot convert from 'std::pair&lt;_Ty1,_Ty2&gt; *' to 'std::pair&lt;_Ty1,_Ty2&gt; *'
</code></pre>

<p>any idea whats going on or maybe a better way to make it work?</p>
