总是报无法解析外部命令
蜡笔小新啦 2012-11-21 01:35:38 ----------------- 头文件
#pragma once
#include <iostream>
using namespace std;
const int defaultSize=100;
template<typename T> class seqList
{
public:
seqList(int sz=defaultSize):maxSize(sz),curSize(-1)
{
if(sz>0)
elements = new T[maxSize];
}
public:
~seqList()
{
delete[] elements;
}
int length() const
{
return curSize +1;
}
//int find(T x) const;
//int isElement(T x) const;
//int insert(T x,int i);
//int remove(T x);
int isEmpty();
private:
int maxSize;
int curSize;
T *elements;
};
--------------- 实现
#include "StdAfx.h"
#include "seqList.h"
template<typename T> int seqList<T>::isEmpty()
{
if(curSize == -1)
return 1;
return 0;
}
为什么一调用isEmpty就报这个错误啊?