Thread: Inheritance and Template Classes

  1. #1
    Registered User
    Join Date
    Apr 2011

    Inheritance and Template Classes

    Would anyone mind posting some links over how to inherit using template classes?

    Long story short, I'm working on a program required to inherit some template classes but I'm kind of stuck at some compiler errors. It's a little too long to post(as there are five header files and one C++ file) and 3 days of Googling hasn't produced much in results...

    If you get a chance to, I'd really appreciate it. My book is a little murky.

  2. #2
    Join Date
    Aug 2010
    somewhere in this universe
    Then post the error.
    "All that we see or seem
    Is but a dream within a dream." - Poe

  3. #3
    Registered User inequity's Avatar
    Join Date
    Nov 2010
    Seattle, Washington
    Let me google that for you

    What's the error?

  4. #4
    template<typename T> threahdead's Avatar
    Join Date
    Sep 2002
    template<typename T>
    class Base
        Base(void) {};
        ~Base(void) {};
    template<typename T>
    class Derived : public Base<T>
    // ...
    I think, thats what you meant, no?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with classes and inheritance!!
    By alacahzam in forum C++ Programming
    Replies: 9
    Last Post: 03-18-2011, 11:39 AM
  2. Multiple inheritance from same base template ambiguity
    By TotalTurd in forum C++ Programming
    Replies: 6
    Last Post: 12-09-2010, 03:40 AM
  3. Replies: 5
    Last Post: 04-15-2009, 02:47 PM
  4. Inheritance + Template
    By audinue in forum C++ Programming
    Replies: 5
    Last Post: 07-20-2008, 12:51 AM
  5. Template and Inheritance
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 04-18-2002, 01:45 PM