#include <iostream>
#include <stdlib.h>
#include <string>
#include <limits>
using namespace std;
template <class Type>
class Ttest{
public:
std::string name(){return "class Ttest";}
virtual Type number(Type t)=0;
};
template <class Type>
class Tson: public Ttest<Type>{
public:
Type number(Type t);
};
template <class Type>
Type Tson<Type>::number(Type t){
return numeric_limits<Type>::max();
}
int main(int argc, char *argv[])
{
Tson<int> d;
cout << d.name() << endl;
cout << d.number() << endl;
return 0;
}
ERRORS: main.cpp:29: no matching function for call to `Tson<int>::number()' main.cpp:21: candidates are: Type Tson<Type>::number(Type) [with Type = int][edited by - JOL on March 2, 2004 5:39:28 PM] [edited by - JOL on March 2, 2004 5:40:23 PM]