When I use a specialized template in different object files, I get a \"multiple definition\" error when linking. The only solution I found involves using the \"inline\" func
You've explicitly instantiated a template in your header (void Hello::print_hello(T var)). This will create multiple definitions. You can solve it in two ways:
1) Make your instantiation inline.
2) Declare the instantiation in a header and then implement it in a cpp.