C++ using <template> in .h
<p>I want to create a function that is</p>

<p>while t is <code>template&lt;typename T&gt;</code></p>

<pre><code>string myFunction(T t) {
    string str1;
    //some computation with t
    return str1();
}
</code></pre>

<p>So in my <code>.h</code> file, I do something like</p>

<pre><code>class myClass {
    private:
    //some variable
    public:
    string myFunction(T); 
}
</code></pre>

<p>and of course it gives an error saying "what is T?"</p>

<p>What should I do to make <code>myFunction</code> able to take a <code>T</code>?</p>
