Tempates (Header vs. Source)

Alright so I have a specific question and I've tried to look it up and I've found several answers to similar questions but not quite answering what I'm hoping to find.

This background is this:

I've just learned about Class and Function Templates. I had an issue where I was getting "Unresolved external symbol..." something along those lines. a Good search and some reading later I found a "work around" Moving all the definitions from my classes source file and simply putting them in the header file. This solved the error and the program runs just fine now.

My question is this:
What are the consequences of placing all my definitions for the template in the header vs. having them in a Source file? I understand having header and source files helps when compiling code, etc, in general. But would it hurt things later to define templates in the header files?
Alright, so I did not find that in my search, I didn't realize that they couldn't be separated so I assumed there was a way to separate them and I just wasn't finding it. And like most things in C++ multiple ways means multiple pro's and con's of each. Explains why I couldn't find anything about the pro's and con's of each. lol they don't exist.

But now that I know why it works the way it does, I guess my question becomes moot.

Thanks for the link Borges!
Topic archived. No new replies allowed.