C++写的一个简单类模版 友元函数求最大最小值

如题 , 编译时总是说 [Error] ld returned 1 exit status (编译器dev c++)

using namespace std;
template <typename t>
class CValue {
    t data[5];
    public:
        CValue();
        friend t Max(CValue <t> a);
        friend t Min(CValue <t> a);
}; 
template <typename t>
CValue <t> :: CValue() {
    cout<<"please input 5 numbers"<<endl;
    for(int i = 0; i < 5; i++)
        cin>>data[i];
}
template <typename t> t Max(CValue <t> a) {
    t x = a.data[0];
    for(int i = 1; i < 5; i++)
        if(x < a.data[1]) x = a.data[1];
    return x;
}
template <typename t>
t Min(CValue <t> a) {
    t min = a.data[0];
    for(int i = 1; i < 5; i++)
        if(min > a.data[1]) min = a.data[1];
    return min;
}
int main() {
     cout<<"整数对象a,";
    CValue<int> a;
    cout<<"浮点数对象b,";
    CValue<float> b;

    cout<<"整数元素对象a的元素最大值为:"<<Max(a);
    cout<<"整数元素对象a的元素最小值为:"<<Min(a)<<endl;
    cout<<"浮点数元素对象b的元素最大值为:"<<Max(b)<<endl;
    cout<<"浮点数元素对象b的元素最小值为:"<<Min(b)<<endl;

}


为什么会这样,请指点,不要怂

为什么会这样,请指点,不要怂

没人会吗?????快来大神

没问题,在VC++ 6.0下。
不过要加上 include iostream