|
Linker errors on my linked list...
Okay, I'm trying to make my own templated linked list class (reinventing the wheel, but that's just a thing I do), and I want to be able to std::cout the nodes in said list. But, when I do, I get...
LinkedList.h:33: warning: friend declaration `std::ostream& operator<<(std::ostream&, const LinkedList<T>&)' declares a non-template function
Okay, let's fix that.
main.cpp:13: partial specialization `operator<< <T>' of function template
...
Well, let's just forgo the warning altogether.
C:\WINDOWS\TEMP/ccyRMggb.o(.text+0xa4):main.cpp: undefined reference to `operator<<(std::ostream&, LinkedList<int> const&)'
.........
Any ideas or hints? This isn't an assignment, I was just curious to see if I could do it.
|