title: How to fix error my function is not define?
body: <pre><code>int main()
   {
      Pair&lt;int, int&gt; A = makePair (10, 20);
      cout &lt;&lt; A ;
   return 0;
  }
  </code></pre>
  
  <p>it give me error here (makePair is not define)
  and i define it in header file</p>
  
  <pre><code>template&lt;class T1, class T2&gt;
  class Pair{
  private:
      T1 first;
      T2 second;
  public:
      Pair(T1, T2);
      Pair() {};
      Pair&lt;T1, T2&gt;  makePair(T1  a, T2  b);
      void operator==(const Pair&amp; other);
      friend ostream&amp; operator&lt;&lt;(ostream&amp; out, const Pair&lt;T1, T2&gt;&amp; A);
  };
  </code></pre>
  
  <p>and this is another file called pair.cpp that i used a template classes in it</p>
  
  <pre><code>template&lt;class T1, class T2&gt;
  Pair&lt;T1, T2&gt; makePair(T1   a, T2   b)
  {
      return (Pair&lt;T1, T2&gt;(a, b));
  }
  </code></pre>