哪位高人帮我看下下面的代码为什么链接出错!
分三个文件,编译时可能通过,但链接出错
Dev C++中出错信息:
         [Linker error] undefined reference to `ArrayList<int>::ArrayList(int)'  
                               ld returned 1 exit status 
/*    文件名:ArrayList.cpp
* 
*     功能: 
*
*     作者: 
*     时间:
* 
*     描述: 
*/
#include <iostream>
#include "ArrayList.h"
template <class T>
ArrayList<T>::ArrayList(int size)
{
    _List = new T [size];
    _length = 0;
    _size = size;
}
           
/*    文件名:main.cpp
* 
*     功能: 
*
*     作者: 
*     时间:
* 
*     描述: 
*/
#include <iostream>
#include "ArrayList.h"
using namespace std;
int main()
{
    ArrayList<int> intArrayList(5);
    system("PAUSE");
    return 0;
} 
/*    文件名:  ArrayList.h
* 
*     功能:  用数组描述的线性类声明 
*
*     作者:  zhoujun 
*     时间:  2006-3-23
* 
*     描述:  Array_LinearList
*/
#ifndef ArrayList_H_
#define ArrayList_H_
#include <iostream>
template <class T> 
class ArrayList
{
      public: 
         ArrayList(int size = 10);
   ~ArrayList() { delete [] _List;}
   bool IsEmpty();
   int Length();
   bool Find(int k, T& x) const;
   int Search(const T& x) const;
   ArrayList<T>& Insert(int k, const T& x);
   ArrayList<T>& Delete(int k, T& x);
   void OutPut(std::ostream& out) const;         
             
      private:
   int _length;
   T * _List;
   int _size;
};      
#endif 
[此贴子已经被作者于2006-3-25 12:12:40编辑过]



 
											





 
	    

 
	