How to pass an object with template function? : <p>Doing my homework, got stuck on the template function part. I have the following <code>main()</code> in my <code>.cpp</code> file:</p>

<pre><code>int main() 
{
Pair&lt;char&gt; letters('a', 'd');
cout &lt;&lt; "\nThe first letter is: " &lt;&lt; letters.getFirst();
cout &lt;&lt; "\nThe second letter is: " &lt;&lt; letters.getSecond();

cout &lt;&lt; endl;

system("pause");
return 0;
}
</code></pre>

<p>I need to use <code>template</code> to make the <code>class</code> exchageable, and here is what I have in the <code>.h</code> file: </p>

<pre><code>template &lt;class T&gt;
class Pair
{
private:    
  T letters;
public:
  T getFirst();
  T getSecond();
};
</code></pre>

<p>now, in my VS, it says both <code>getFrist()</code> and <code>getSecond()</code> are not found. How am I supposed to pass T as a <code>class</code> in <code>template</code>?</p>
