title: Void pointer pointer (void **)
body: <p>I am reading a COM sample at <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd389098%28v=vs.85%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/dd389098(v=vs.85).aspx</a></p>
  
  <p>I really cannot comprehend (void **) in </p>
  
  <pre><code>hr = pGraph-&gt;QueryInterface(IID_IMediaControl, (void **)&amp;pControl);
  </code></pre>
  
  <p>So I have tried some values returned by different types of pointers by the class</p>
  
  <pre><code>class Point{
  private:
      int x, y;
  public:
      Point(int inputX, int inputY){x = inputX, y = inputY;}
      int getX(){return x;}
      int getY(){return y;}
      friend ostream&amp; operator &lt;&lt; (ostream &amp;out, Point &amp;cPoint);
      Point operator-(){
          return Point(-x, -y);
      }
  };
  
  ostream&amp; operator &lt;&lt; (ostream &amp;out, Point &amp;cPoint){
      return out&lt;&lt; "(" &lt;&lt; cPoint.x &lt;&lt; ", " &lt;&lt; cPoint.y &lt;&lt; ")";
  }
  </code></pre>
  
  <p>and printing out </p>
  
  <pre><code>Point *p = new Point(1,2);
  cout &lt;&lt; p &lt;&lt; endl &lt;&lt; &amp;p &lt;&lt; endl &lt;&lt; endl
  &lt;&lt; *&amp;p &lt;&lt; endl&lt;&lt; **&amp;p &lt;&lt; endl&lt;&lt;endl 
  &lt;&lt; (void *) &amp;p &lt;&lt; endl &lt;&lt; (void **) &amp;p ;
  </code></pre>
  
  <p>(void*) really has no difference with (void **). What does (void **)&amp;pControl want to return?</p>