Together.cpp: Code: http://pastebin.com/yMFMKe1K 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!
Even worse, when uncommenting the iterate function, it gives me an even scarier error!
I'm very sorry for the inconvenience caused by the bad formatting of this post. Please can I have some help. :)
Asked
Active
Viewed 35 times
0

Skydive
- 25
- 5
1 Answers
1
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.

Quentin
- 62,093
- 7
- 131
- 191
-
1Further information on this topic: [Why can templates only be implemented in the header file?](http://stackoverflow.com/questions/495021/why-can-templates-only-be-implemented-in-the-header-file) – Jul 04 '14 at 20:30