Difference between * and *&
<p>When I have defined fnc in a following way:  </p>

<pre><code>QDialog* get_dialog(Caller* caller);   
</code></pre>

<p>then calling it with my class   </p>

<pre><code>class Main_Dialog : public Base_Dialog&lt;Ui::Main_Dialog&gt;{};
</code></pre>

<p>works.  </p>

<pre><code>//def of Base_Dialog   

template&lt; class Ui_Dialog &gt;
class Base_Dialog : public QDialog, protected Ui_Dialog{};  
</code></pre>

<p>but if I define this fnc as:  </p>

<pre><code>QDialog* get_dialog(Caller*&amp; caller);   //note ref  
</code></pre>

<p>then code doesn't compile, giving error:  </p>

<pre><code>error: no matching function for call to 'Main_Dialog::get_dialog(Main_Dialog* const)'  
</code></pre>

<p>candidate is:  </p>

<pre><code>template&lt;class Dialog, class Caller&gt; QDialog* Main_Dialog::get_dialog(Caller*&amp;)  
</code></pre>

<p>Isn't that the fnc I'm trying to call? What's wrong?</p>
