What does template<class key, class type> mean before a method in C++?
<p>I have got this code and I am trying to understand the convention followed, all the method defined in the .cpp file have <code>template&lt;class KeyType, class DataType&gt;</code> written before them. What does that mean?</p>

<p>Example:</p>

<pre><code>//Constructor
template&lt;class key, class type&gt;
MyOperation&lt;key, type&gt;::MyOperation()
{
  //method implementation
}

//A method
template&lt;class key, class type&gt;
MyOperation&lt;key, type&gt;::otherOperation()
{
  //method implementation
}
</code></pre>

<p>Thanks</p>
