title: function pointers in c++ : error: must use '.*' or '->*' to call pointer-to-member function in function
body: <p>Code snippet is as follows. Not able to understand why I am getting this error.</p>
  <pre><code>void
  SipObj::check_each_field()
  {
    map &lt;std::string, sip_field_getter&gt;::iterator msg;
    string str;
    char name[20];
    bool res = false;
    sscanf(get_payload(), &quot;%s %*s&quot;, name);
    LOGINFO(lc()) &lt;&lt;  &quot;INVITE:&quot; &lt;&lt; name;
    str = name;
    msg = sip_field_map.find(str);
    if (msg != sip_field_map.end()) {
        sip_field_getter sip_field = msg-&gt;second;
        res = (this).*sip_field();
    }
  }
  
   typedef bool (SipObj::*sip_field_getter)();
   static map &lt;std::string, sip_field_getter&gt; sip_field_map;
  </code></pre>
  <p><code>sip_field_getter</code> is a place holder for function names</p>