title: instantiating a class template and call its methods
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/495021/why-can-templates-only-be-implemented-in-the-header-file">Why can templates only be implemented in the header file?</a>  </p>
  </blockquote>
  
  
  
  <p>When I include MyClass.h and do:</p>
  
  <pre><code>MyClass&lt;int, int&gt; ccc = MyClass&lt;int, int&gt;();
  ccc.myMethod1(3, 4);
  </code></pre>
  
  <p>I get a lot of errors telling undefined reference to constructor and methods ... However when I include MyClass.cpp (which is not a proper why to code) there is no error ! How to fix that ?</p>
  
  <p>I'm compiling under Code::Blocks using g++</p>