C++ Function pointer map with Class Member Variables
<p>I am trying to make a stl map with key as "KEYWORD" and value as "Class member function" But it is not getting compiled. 
Following is the code. Can anybody please let me know what is wrong. The class member functions are not static.</p>

<pre><code>typedef void (RemoteHostManager::*CmdHandlerPtr)(char *);
typedef std::map&lt;char *,CmdHandlerPtr&gt; CommandHandlerSet;
typedef std::map&lt;char *,CmdHandlerPtr&gt;::iterator CommandHandlerSetItr;

void RemoteHostManager::InitializeCmdHandlerMap()
{
    m_CommandSet["HELP"]    = &amp;RemoteHostManager::usage;
    m_CommandSet["CONNECT"] = &amp;RemoteHostManager::Connect;
    m_CommandSet["READ"]    = &amp;RemoteHostManager::Read;
    m_CommandSet["WRITE"]   = &amp;RemoteHostManager::Write;
    m_CommandSet["STOP"]    = &amp;RemoteHostManager::Stop;
    m_CommandSet["START"]   = &amp;RemoteHostManager::Start;
}
</code></pre>

<p>Following are the errors:</p>

<pre><code>RemoteHostManager.cpp: In member function `void
   RemoteHostManager::InitializeCmdHandlerMap()':
RemoteHostManager.cpp:14: no match for `std::_Rb_tree_iterator&lt;std::pair&lt;const
   std::string, void (RemoteHostManager::*)(char*)&gt;, std::pair&lt;const
   std::string, void (RemoteHostManager::*)(char*)&gt;&amp;, std::pair&lt;const
   std::string, void (RemoteHostManager::*)(char*)&gt;*&gt;&amp; [const char[5]]'
   operator
//similar error for other assignments!
</code></pre>
