Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 420035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:50:11+00:00 2026-05-12T18:50:11+00:00

Once and for all I want to clearify this somewhat subjective and argumentative area

  • 0

Once and for all I want to clearify this somewhat subjective and argumentative area of programming.

Multiple inheritnace

In my current working enviornment I have C++ developers and C# developers which come from totaly different worlds and thus have different opinions on programming layout.

Now being a C# and Java developer myself I’ve never come to the state where I actually needed to use Multiple inheritance, but C++ developers around me tend to through out comments like “That would be a perfect way to use Multiple inheritance”

Of course I tend to dissagree.

My question

In what scenario would multiple inheritance be a better or easier way to solve a problem than use of Interfaces and just simple inheritance?

And can you always solve the multiple inheritance benefits by using ie member variables instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:50:12+00:00Added an answer on May 12, 2026 at 6:50 pm

    Except that you seem to be proposing to use multiple inheritance.

    Inheritance has different uses. Public inheritance specifies an IS-A relationship, and inheritance with any access modifiers can provide behavior to the child class, which can then be overridden. In C# and Java (which I’m more familiar with), interfaces provide the IS-A interface without behavior. (In C++, you can do an interface by defining a class with no data members and all functions pure virtual.)

    So, if you provide an interface, and put in a member variable to provide behavior, you’re doing full C++-style inheritance. You’re just breaking it up into components and taking more trouble to do it. Describing this as solving the multiple inheritance problem is disingenuous, since doing that with two interfaces and two member variables is multiple inheritance. It gets even more awkward if you’re going to modify the behavior in a polymorphic fashion, since either you need parallel inheritance hierarchies or a more complicated dispatch to the member variable.

    There are problems with C++ multiple inheritance, true, but there are also uses that don’t present problems. The first good use I saw was “mix-ins”: small classes to add certain behaviors. There’s plenty of interfaces to these in Java, but you’re expected to handle the behavior by yourself.

    If you’re interested in learning more about multiple inheritance, I’d suggest trying a language, like Common Lisp, where multiple inheritance is routinely used and nobody has problems with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All I want is to clear my renderTarget2D once so that it starts off
Hi I want to delete all stuff related to rails generate scaffold at once.
Once all three loads are complete... $(#sidebar a).live(click, function(e){ $(this).addClass(selected loading); $(#conceptual).load(conceptualUrl, null, function(){
i have a situation where i want to execute a script once all onload
My original understanding was that the asp.net page lifecycle is run once for all
My program is downloading data from a server, once he received all the data,
Once I run search all using Ctrl + Shift + F then my search
hi all i'm trying to perform an action once the user double clicks on
Someone once showed me a cool IntelliJ Idea plugin that would show all the
I'm fetching data from all 3 tables at once to avoid network latency. Fetching

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.