Using linked list templates

This is a discussion on Using linked list templates within the C++ Programming forums, part of the General Programming Boards category; I am sorry about this but this really confuses me for some reason. I am just trying to do statement ...

Using linked list templates

I am sorry about this but this really confuses me for some reason. I am just trying to do statement coverage for a header file that I am including in my cpp file. This header file contains various functions used to do different things to the linked list. I am really stuck on this and I'm sure it's a simple thing. Here is the header file that contains all the functions I need to use for my statement coverage:

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell

I'm sorry but I just don't get it. I can't seem to call ANY function because I apparently have no idea what I'm doing. I don't know why this is so confusing for me when I can easily build a linked list without templates. If anyone could just do ONE example for me or just explain it a little clearer I would greatly appreciate it.

All the function bodies for the different things done to the linked list are in the header file. I don't need to write the function bodies. I just need to use these functions! This is very frustrating!

Your code how you create class instances and how you call member functions is all wrong. The usage is not really different from non-templated classes (except the instance declaration takes the template arguments in <>).

What is different is that templated code must be implemented in the header file as the implementations need to be available to the compiler while it is compiling any file that includes the header (your main function). You can't separate template classes between a .h and .cpp file.