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)