c++ method argument class reference
<p>I'm sorry to ask such a newbie question.
Here is my problem :</p>

<pre><code>MyClass* c = new MyClass("test");
method(c);//error cannot convert MyClass* to MyClass
</code></pre>

<p>the definition :</p>

<pre><code>method(MyClass c);
</code></pre>

<p>should I also define ?</p>

<pre><code>method(MyClass* c);
</code></pre>

<p>I don't want to duplicate the code, what is the proper way ?</p>
