Mail Archives: djgpp/1995/04/26/03:55:45
Dear All
I'm having a few problems understanding what exactly to do with templates.
I think I adopt a rather non-standard coding style, in that all my C++ code
is kept in header files with extensions .hxx, and class definitions in files
.h. I use templates to provide type-independant linked lists, queues etc.
The problem comes when I want to use two lists of the same type in different
source files, say two lists of chars. When I do this, the linker complains
that I have mutiple references to LinkedList <char>.
I am aware that this is described in an info page, but I found it poorly
described and failed to solve the problem. I would appreciate anyone who
can shed a little light on this.
Yours
Ben Runnacles
Image, Speech and Intelligent Systems Group
University of Southampton, UK.
- Raw text -