#pragma once
#ifndef _ARRAYLIST_
#define _ARRAYLIST_
#include<iostream>
#include <exception>
template<class T>
class ArrayList
{
private:
T* elementData;
int size = 0;
int length = 0;
T* DEFAULTCAPACITY_EMPTY_ELEMENTDATA = {};
public:
// ArrayList(int initalCapacity);
ArrayList();
};
#endif
#include "ArrayList.h"
template<class T>
ArrayList<T>::ArrayList()
{
this->elementData = this->DEFAULTCAPACITY_EMPTY_ELEMENTDATA;
}
在调用构造函数的时候出现无法解析的符号错误