I'm try to be defined outside of the class template member function, but it is an error,
code,see below:
#include
using namespace std;
template
class Compare
{
public:
Compare(NumType a,NumType b)
{
x=a;
y=b;
}
NumType max();
/*{
return(x>y?x:y);
}*/
NumType min();
/*{
return(x
private:
NumType x,y;
};
template
NumType Compare
{
return(x>y?x:y);
}
NumType Compare
{
return(x
int main()
{
int i=19,j=27;
float x=6.5,y=2.9;
Compare
Compare
cout<<"type of data for int,the max is "<
}
thanks.

VulpesPosted Nov 22, 2012, 11:22 AM
Here, you're missing it before the min() function: