Ehh... you template the class definition not the prototypes inside of it and you name the template before the scope resolution. Then you have to name a type on your objects.
Code:
template<typename Any>
class CTime
{
public:
CTime(int mn, int hr); // Why is the constructor accepting ints, shouldn't it
// accept the templated type?
~CTime();
void max(Any no);
};
Code:
#include "Time.h"
template<typename Any>
CTime<Any>::CTime(int mn, int hr)
{
}
template<typename Any>
CTime<Any>::~CTime()
{
}
template<typename Any>
void CTime<Any>::max(Any no)
{
}
Code:
#include "Time.h"
int main()
{
CTime<int> T(1,2);
T.max(3.8);
return 0;
}