Template class files

Hello everyone,
I'm trying to write a template class but I didn't understand how .h and .cpp files are to be managed. Where should the implementations and declarations be? Do I have to create both .h and .cpp files?
Thank you in advance
all of class template goes into the .h file. The only thing that goes into .cpp file are static data members (until C++17, which makes it possible to define those inline too) and non-inline non-template functions that you're calling from the members of the template (if any)
Thank you for the very fast reply!
Last edited on
Topic archived. No new replies allowed.