title: How to fix this class template error?
body: <p>This is my first time ever attempting to use class templates (I'm very new to C++)</p>
  
  <p>I'm trying to create a very simple <code>Number</code> class.  To start, I'm creating a <code>ToString</code> method.  As of now, for testing purposes, I just want <code>ToString</code> to return the string <code>"testing"</code>.</p>
  
  <p>When I run my code, I get the following error:</p>
  
  <p><code>Undefined symbols for architecture x86_64:
    "Number&lt;int&gt;::ToString()", referenced from:
        _main in main.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [build/ml] Error 1</code></p>
  
  <p>Here is my code, any help is appreciated:</p>
  
  <p>main.cpp</p>
  
  <pre><code>#include "number.h"
  
  int main(int argc, char* argv[]) {
      Number&lt;int&gt; x(15);
      x.ToString();
      return 0;
  }
  </code></pre>
  
  <p>number.h</p>
  
  <pre><code>#ifndef _NUMBER_
  #define _NUMBER_
  
  #include &lt;iostream&gt;
  
  template &lt;class T&gt; 
  class Number {
      private:
          T m_val;
      public:
          Number(T val) : m_val(val) {};
          std::string ToString();
  };
  
  #endif
  </code></pre>
  
  <p>number.cpp</p>
  
  <pre><code>#include "number.h"
  
  template&lt;class T&gt; 
  std::string Number&lt;T&gt;::ToString() {
      return std::string("testing");  
  }
  </code></pre>