Why can I separate the definition of my templates class from its declaration and put it inside a .cpp file?
If all you want to know is how to fix this situation, read the next two FAQs. But in order to understand why things are the way they are, first accept these facts: • A template is not a class or a function. A template is a “pattern” that the compiler uses to generate a family of classes or functions. • In order for the compiler to generate the code, it must see both the template definition (not just declaration) and the specific types/whatever used to “fill in” the template. For example, if you’re trying to use a Foo