title: Mental model for void* and void**?
body: <p><em>Note:</em> I'm a experienced C++ programmer, so I don't need any pointer basics. It's just that I never worked with <code>void**</code> and have kind of a hard time getting my mental model adjusted to <code>void*</code> vs. <code>void**</code>. I am hoping someone can explain this in a good way, so that I can remember the semantics more easily.</p>
  
  <p>Consider the following code: (compiles with e.g. VC++ 2005)</p>
  
  <pre><code>int main() {
    int obj = 42;
    void* ptr_to_obj = &amp;obj;
    void* addr_of_ptr_to_obj = &amp;ptr_to_obj;
    void** ptr_to_ptr_to_obj = &amp;ptr_to_obj;
    void* another_addr = ptr_to_ptr_to_obj[0];
    // another_addr+1; // not allowed : 'void*' unknown size
    ptr_to_ptr_to_obj+1; // allowed
  }
  </code></pre>