I am trying to make a stack of linked lists and I am running into a error
Here is my deconstructor:
template <typename T>
mystack<T>::~mystack()
{
node_type* temp;
while (pTop != nullptr) {
temp = pTop;
pTop = pTop->getNext();
delete temp;
}
}
The error is being thrown when I call this function
double process_line(std::istream& input) {
DS::mystack<double> stack;
//std::cout << stack.size();
if (isdigit((input.get()))) {
//stack.push(input.get);
}
else {
}
return 0;
}
When I don't create a new stack I don't get the error but when I do I get this error code Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: virtual __thiscall DS::mystack<double>::~mystack<double>(void)" (??1?$mystack@N@DS@@UAE@XZ) referenced in function "public: virtual void * __thiscall DS::mystack<double>::`scalar deleting destructor'(unsigned int)" (??_G?$mystack@N@DS@@UAEPAXI@Z) lob06 C:\Users\name\source\repos\lob06\processline.obj 1
Any help would be appreciated.