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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:26:29+00:00 2026-06-07T10:26:29+00:00

What is the difference between a sub-object and a contained object ? For constructing

  • 0

What is the difference between a sub-object and a contained object? For constructing an instance of a class which is derived from another class, first the sub-object has to be created and then the derived object has to be created.

Questions:

  1. Is it true that derived object contains the sub-object?

  2. How can one visualize the difference in the structure of an object

    a) which contains another object

    b) which is derived from another class

    Do the objects in a) and b) have the same structure ?

  • 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-06-07T10:26:31+00:00Added an answer on June 7, 2026 at 10:26 am

    Yes, derived object contains instances of its base class subobjects.

    Physically there’s really no difference between containing an object (as a member) and deriving from an object. Moreover, the language refers to both as subobjects: base class subobjects and member subobjects.

    Virtual inheritance typically introduces some additional household data, which makes it more complicated than just “containing” a base subobject, but ordinary inheritance usually just boils down to plain “containment”.

    The difference between deriving and containing as member really exists only on conceptual level. Different access syntax, different features. For example, derivation in involved into such language features as polymorphism.

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

Sidebar

Related Questions

Whats the difference between using a LEFT OUTER JOIN , rather than a sub-query
What are the difference between a public class member class data { public: std::list<data>
So, I believe this has something to do with the difference between arrays and
What is the difference between a class with protected constructors and a class marked
What's the difference between the built in ref($object) and Scalar::Util blessed($object) ? Is one
What is the difference between writing sub functions and putting it all in one
What is the difference between the enter and push ebp mov ebp, esp sub
I see no difference in sub classing the models.manager object and overriding the get_query_set
In this excellent SO question , differences between CTE and sub-queries were discussed. I
Difference between start-pointers and interior-pointers and in what situation we should prefer one over

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.