title: C++ | Dereference a member pointer
body: <p>Well, lets say that I have a <code>struct</code> or a <code>class</code> that has a lets say <code>int</code> pointer as one of its members, something like this:</p>
  
  <pre><code>struct /*or class*/ some_struct /*or class*/ {
      int *pointer = NULL;
  } *obj_pointer;
  </code></pre>
  
  <p>and as the program goes <code>obj_pointer</code> and <code>obj_pointer-&gt;pointer</code> get initialized, how can I dereference <code>obj_pointer-&gt;pointer</code> so that I can print(<code>cout</code>) for example the value of the memory the pointer is pointing to?</p>