Jump to content
  • Advertisement
Sign in to follow this  
ijm

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

This topic is 2955 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

Hello.
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?
Thanks.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!