Possible Duplicate:
Why can templates only be implemented in the header file?
Why should the implementation and the declaration of a template class be in the same header file?
I am going to create a couple of ADTs and compare their performance(I am taking a data structures course and want to experiment;note: our instructor uses Java). I want to create generic classes so that I am not stuck with a particular datatype. I read a long time ago that it is not possible to split templated classes. What is the best approach to keep the code clean? The most obvious approach is to simple uses .cpp files without hiding implementation, such as in java. Is there any other approach that I could use?