Thread: inherited for C++

  1. #1
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187

    Question inherited for C++

    if I have the code like
    Code:
    class A {
        public: virtual void f() {....}
    };
    
    class B : public A {
        public: void f() {....} //override here
    };
    When I call B::f() but I want it to do inherited one from A class before override what shall I write in {....} of B class?

    Jaguar

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    A::f()
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  3. #3
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187
    Thanks I shall try then.
    First I though that there is some keyword like "inherited" as I am also working with Delphi.

    Jaguar

  4. #4
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Well, C++'s multiple inheritance screws that up .
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inherited Templates
    By Dae in forum C++ Programming
    Replies: 7
    Last Post: 01-13-2009, 11:06 PM
  2. operator overloaded but not inherited
    By vaibhav in forum C++ Programming
    Replies: 5
    Last Post: 08-07-2006, 05:02 AM
  3. Help With Inherited Classes Needed
    By elliott in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2005, 09:05 AM
  4. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM
  5. Inherited static members
    By Vikstar in forum C++ Programming
    Replies: 2
    Last Post: 08-28-2003, 11:44 PM