i ran into a problem implementing a hash table, and distilled the problem down to some small classes, but i don't know what's wrong with them. g++ returns 'multiple definition of' errors when i try to link:
main.o: In function `Base<char>::hash(char&)':
main.cpp:(.text+0x0): multiple definition of `Base<char>::hash(char&)'
Inherit.o:Inherit.cpp:(.text+0x0): first defined here
collect2: ld returned 1 exit status
Create a file base.cpp and move your definition of Base<char>::hash into it. My C++ is rusty, but I think that because the function has no uninstantiated template parameters it is treated like a normal function in terms of duplicate definitions. Since main.o and inherit.o are both compiled using base.h, they both have their own definitions of Base<char>::hash, which the compiler disallows at link time.