Inherite nonvirtual class functionality

This is a discussion on Inherite nonvirtual class functionality within the C++ Programming forums, part of the General Programming Boards category; Hi, let's see if you can follow this... I have made a virtual class that inherits from another virtual class. ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    158

    Inherite nonvirtual class functionality

    Hi, let's see if you can follow this... I have made a virtual class that inherits from another virtual class. The old virtual class had a implementation class that inherited from it that now instead inherits from my new virtual class. The new implementation class made for the new virtual class needs to use some functions from the "old" implementation class that are only defined inside that class and not in the old virtual class.

    How do I set things up so that my new implementation class can use functions from the other implementation class that are not defined in the original virtual class?
    home = hat.position;

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,725
    I do not quite follow you. Mind giving a code example? It is also not clear if the "old" classes are removed, or if they continue to exist.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    158
    Nevermind, it turns out that I don't need a second implementation class. I can implement the new functionality in the exsting one which means I have access to all its functions. Just kept the new virtual class and adjusted inheritance.
    home = hat.position;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Specializing class
    By Elysia in forum C++ Programming
    Replies: 6
    Last Post: 09-28-2008, 04:30 AM
  2. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Replies: 7
    Last Post: 05-26-2005, 10:48 AM
  5. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 01:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21