title: calling a C++ member function using the object address and the method address and signature
body: <p>How can I call a method of an object knowing the address of the object and the address of the method(and its signature):</p>
  
  <pre><code>auto x = (int(*)())(&amp;A::get_state)
  </code></pre>
  
  <p>Let the object be <code>x</code> of type <code>void*</code>.</p>
  
  <p>So, using <code>x</code> and <code>m</code>, <code>x</code> of type <code>void*</code> and <code>m</code> of type <code>int(*)()</code></p>