title: C++ object representation
body: <p>I have a doubt: I can declare a pointer to a class member function</p>
  
  <pre><code>void (*MyClass::myFunc)(void);
  </code></pre>
  
  <p>and I can declare a pointer to a class member variable</p>
  
  <pre><code>int (MyClass::*var);
  </code></pre>
  
  <p>My question is: how is an object (composed by member functions and member variables) structured in memory (asm-level) ?</p>
  
  <p>I'm not sure because, except for polymorphism and runtime virtual functions, I can declare a pointer to a member function even without an object and this implies that the code functions are shared among multiple classes (although they require a *this pointer to work properly)</p>
  
  <p>But what about the variables? How come I can declare a pointer to a member variable even without an object instance? Of course I need one to use it, but the fact that I can declare a pointer without an object makes me think a class object in memory represents its variables with pointers to other memory regions.</p>
  
  <p>I'm not sure if I explained properly my doubt, if not just let me know and I'll try to explain it better</p>