title: What does `*&` in a function declaration mean?
body: <p>I wrote a function along the lines of this:</p>
  
  <pre><code>void myFunc(myStruct *&amp;out) {
      out = new myStruct;
      out-&gt;field1 = 1;
      out-&gt;field2 = 2;
  }
  </code></pre>
  
  <p>Now in a calling function, I might write something like this:</p>
  
  <pre><code>myStruct *data;
  myFunc(data);
  </code></pre>
  
  <p>which will fill all the fields in <code>data</code>. If I omit the '<code>&amp;</code>' in the declaration, this will not work. (Or rather, it will work only locally in the function but won't change anything in the caller)</p>
  
  <p>Could someone explain to me what this '<code>*&amp;</code>' actually does? It looks weird and I just can't make much sense of it.</p>