In principle you can't, which is called the "Inclusion model", where you have to put your implementations in your header file, which is totally fine!!!
BUT, if you insist on having a separate file, there are 2 ways to do it:
1- declaration model
2- separation model
In the first one, you have to instantiate each type you're gonna use in you're gonna use, which makes things way too bad if you have big projects.
The second one is for pros. It's not easy to use it and could mess stuff up. In this, you add the word "export" before your template class. Please read more details about this here:
In this, you add the word "export" before your template class.
export is no longer with us in C++11.
#including your .cpp file in the .h file is the same as putting the implementation into your .h file. I don't see any reason not to do it directly, myself.