• Advertisement
Sign in to follow this  

[c++] Problem = Inheritance + Class Template + Namespace

This topic is 2765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Without any problems I can inherit class from class template - class.
Each definition has its own header file and each declaration has its own source file. And it all works fine while the definitions of both classes are not within any Namespace. When I define them in a namespace (both in the same namespace) debuger tells me the following:

undefined reference to "NamespaceName::ctClassName<int>::Function(int const&)"
//in this case "int" since I inherited class like this:

class BabayClass:public ctClassName <int> {...

Where did I go wrong?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement