How to fix 'unresolved overloaded function type?'
<p>This is the class </p>

<pre><code>class Channel
{
    public:
        Channel(int channelNumber, ChannelType channelType);
};
</code></pre>

<p>and this is the map</p>

<pre><code>map&lt;int, Channel&gt; m_Channel(int, ChannelType);
</code></pre>

<p>Why does attempting to add a <code>Channel</code> to the map like this</p>

<pre><code>m_Channel[channelNumber] = Channel(channelNumber, channelType);
</code></pre>

<p>cause this compile error?</p>

<blockquote>
  <p>error: invalid types <code>‘&lt;unresolved overloaded function type&gt;[int]’</code> for
  array subscript</p>
</blockquote>

<p><code>int</code> seems like a perfectly valid type for an array subscript.</p>