Skydive
Skydive

Reputation: 25

Weird undefined references on template linkedlist class

Together.cpp: Code: http://pastebin.com/yMFMKe1K Output + Compilation: Output + Compilation But, when split into the LinkedList class. CPP: http://pastebin.com/3hLYb18X H: http://pastebin.com/ibEZQ0ut main: http://pastebin.com/AmFf65KC It decides to error!Error 1 Even worse, when uncommenting the iterate function, it gives me an even scarier error! Error 2 I'm very sorry for the inconvenience caused by the bad formatting of this post. Please can I have some help. :)

Upvotes: 0

Views: 36

Answers (1)

Quentin
Quentin

Reputation: 63124

Templates must be fully defined in the header file (i.e, no .cpp). Just cut & paste your implementation from your .cpp to the bottom of your header.

Upvotes: 1

Related Questions