下列类的模板错在哪里
#include<iostream>using namespace std;
template <typename T>
class FUN
{
T data1,data2;
public:
FUN (T,T);
T GetData1 ( ) const;
T GetData2 ( ) const;
};
template <typename T>
FUN<T>::FUN(T d1,T d2):data1(d1),data2(d2)
{}
template <typename T>
T FUN<T>::GetData1( ) const
{
return data1;
}
template <typename T>
T FUN<T>::Getdata2() const
{
return data2;
}
int main()
{
FUN <double>(3.0,9.5);
return 0;
}