iamwljiang wrote:
> This code have link error,but I can't find it.I need someone help me find it
> and tell me where is error and why...
>
> I use Dev-C++ compile it that the error show is Array(int n=50); and ~Array()
> link error.
>
> template<class T>
> Array<T>::Array(int n)
> {
> size = n;
>
> if(n < 0) Error(invalidArraySize);
>
> T>::~Array()
> { alist = new T[size];
> if(alist == NULL) Error(memoryAllocationError);
>
> }
> template<class T>
> Array<
> delete []alist;
> alist =0;
> size = 0;
> }
Well, your constructor is mangled beyond recognition. Not really
surprised the compiler is taking issue with it.
--
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197
*NEW* MyTaskFocus 1.1
Get on task. Stay on task.
http://www.CubicleSoft.com/MyTaskFocus/