What does template<class key, class type> mean before a method in C++?
- by zengr
Hi,
I have got this code and I am trying to understand the convention followed, all the method defined in the .cpp file have template<class KeyType, class DataType> written before them. What does that mean?
Example:
//Constructor
template<class key, class type>
MyOperation<key, type>::MyOperation()
{
//method implementation
}
//A method
template<class key, class type>
MyOperation<key, type>::otherOperation()
{
//method implementation
}
Thanks