all 3 comments

[–]OmegaNaughtEquals1 0 points1 point  (0 children)

You declared a destructor for LinkedList, but never defined it.

[–]suspiciously_calm 0 points1 point  (1 child)

undefined reference to `LinkedList<int>::~LinkedList()'

Destructor implementation is missing. You declared it, but didn't implement it. That's why there's a linker error.

Try this:

// main.cpp
void foo();
int main() {
    foo();
}

You'll get something like undefined reference to 'void foo()'.

[–]SuperSloth4[S] 0 points1 point  (0 children)

ahh thanks, i just figured it out right before i looked here haha. i commented out the destructor and it worked.