The issue is that it's trying to instantiate the template with the type Lancamento
and it can't find the code in LinkedList.cpp. At some stage the compiler needs all of the following in the same file (technically: same translation unit):
- the definition of
Lancamento
- the full definition of
LinkedList
(including methods) - a reference to
LinkedList<Lancamento>
Where is up to you. When using templates it's best to put all the template code in a header together, using inline
if need be on methods. Check here for further reading.
Also, I strongly recommend to use std::list
. The standard library is your friend and will do things better than you can.