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 7417017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:36:54+00:00 2026-05-29T07:36:54+00:00

I have a requirement which will form the diamond dread pattern. But I have

  • 0

I have a requirement which will form the diamond dread pattern. But I have come across comments from stack overflow mates that if the virtual base class is a pure abstract class, then the diamond pattern is not so much of a concern. Can someone please expand on this as to why it is so?

  • 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-29T07:36:56+00:00Added an answer on May 29, 2026 at 7:36 am

    Multiple inheritance in C++ is a powerful, but tricky tool, that often leads to problems if not used carefully.

    Following article will teach you how to use virtual inheritance to solve some of these common problems programmers run into.

    Solving the Diamond Problem with Virtual Inheritance

    try to implement dimond as follow:Article gives very good explanation

    class storable 
    {
            public:
            storable(const char*);
            virtual void read()=0; //this becomes pure virtual making storable an abstract
            virtual void write(); //class
            virtual ~storable();
            private:
            ....
    }
    
    class transmitter: public virtual storable 
    {
            public:
            void write()
            {
                    read();
                    ....
            }
    } 
    
    class receiver: public virtual storable
    {
            public:
            void read();
    }
    
    class radio: public transmitter, public receiver
    {
            public:
            ...
    }
    
    int main()
    {
            radio *rad = new radio();
            receiver *r1 = rad;
            transmitter *r2 =rad;
    
            rad->write();
            r1->write();
            r2->write();
            return 1;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the requirement to build a asp.net sign up form which will allow
i have a requirement in which i will retrieve all the records from the
I have a requirement on my current project (a Flex app which will be
I have a requirement to create a windows form control which has to detect
I have a requirement to put together an application which will generate a web
Hey guys, here's my requirement: I have one central App which receives requests from
I have a data storage requirement which is an excellent candidate for single instance
I have requirement like, suppose I have a 'property' table which has 'ListingKey' field
I have following requirement, I have C#/.Net console application, which refers to 'System.Data.Sqlite.dll' 'System.Data.Sqlite.dll'
I have a reporting requirement in my web application for which I am looking

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.