Witam
Mam problem z podziałem klasy na plik nagłówkowy i logiki. Gdy wpiszy wsyzkstko w pliku nagłówkowym nie ma problemu natomiast gdy przeniosę konstruktor do pliku cpp, to lnker daje błąd: main.obj : error LNK2019: unresolved external symbol "public: __thiscall ArrayList<int>::ArrayList<int>(void)"
mój kod to:
#pragma once
#include "IndexOutOfBoundsException.h"
template <class T>
class ArrayList
{
T** dynamicArray;
int increase;
int count;
int capacity;
public:
ArrayList();
void add(T* item);
T* operator[](int index)const;
};
a także:
#include"ArrayList.h"
template<class T>
ArrayList<T>:: ArrayList()
{
increase=5;
dynamicArray = new T*[increase];
capacity=5;
count=0;
}
template<class T>
void ArrayList<T>::add(T* item)
{
}
template<class T>
T* ArrayList<T>::operator[](int index)const
{
}