title: How to get the address of a value, pointed to by a pointer
body: <p>I have a pointer to an int.</p>
  
  <pre><code>int index = 3;
  int * index_ptr = &amp;index;
  </code></pre>
  
  <p><code>index_ptr</code> is a member variable of a class <code>IndexHandler</code>.</p>
  
  <p>class A has a std::vector of IndexHandlers, Avector.
  class B has a std::vector of pointers to IndexHandlers, Bvector, which I set to point to the items in class A's vector, thusly:</p>
  
  <pre><code>Bvector.push_back(Avector[i].GetPtr())
  </code></pre>
  
  <p>With me so far?</p>
  
  <p>I want to check that when I resolve the pointers in Bvector, and retreive the internal IndexHandlers <code>index_ptr</code>, that they point to the same <code>index_ptr</code> as class A's...</p>
  
  <p>How can I check they are pointing to the same memory address?...
  How do i print the address of the value pointed to by both sets of pointers?</p>