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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:37:35+00:00 2026-05-25T23:37:35+00:00

What i think is that dynamic type means dynamically allocated object using new .

  • 0

What i think is that dynamic type means dynamically allocated object using new. In the following case, do you say p points to dynamic type or static type of object? In standard, it doesn’t say about dynamic type being dynamic object.

1.3.3 – The type of the most derived object (1.8) to which the lvalue denoted
by an lvalue expression refers. [Example: if a pointer (8.3.1) p whose
static type is “pointer to class B” is pointing to an object of class
D, derived from B (clause 10), the dynamic type of the expression *p
is “D.” References (8.3.2) are treated similarly. ]

Also what does it the following quote mean

The dynamic type of an rvalue expression is its static type

class Base {
    virtual void foo(){}
};

class Derived : public Base {
    void foo(){}
};

int main()
{
    Derived d;
    Base *p = &d;
}
  • 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-25T23:37:36+00:00Added an answer on May 25, 2026 at 11:37 pm

    What i think is that dynamic type means dynamically allocated object
    using new.

    Nope.

    The dynamic type is the real type of an object that might be accessed via a reference (pointer included) that point to a base type of its real type.

    That is, if we have :

    class A {
    
    };
    
    class B : public A { };
    
    
    B l;
    A& k = l;
    

    Here k is a reference to an object of type A, but the real type of the referred object, its dynamic type, is B.

    Here “dynamic” has the meaning of “known only at run-time”.

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

Sidebar

Related Questions

I think that business logic should exist in a model when using an MVC
I think that it used to the be the case that in Liferay 4,
I think that this problem can be sorted using reflection (a technology which I'm
I have this question about c# language's dynamic binding behavior. Consider the following object
I think that java executables (jar files) are trivial to decompile and get the
just think that when I opened my file then when I want to write
I think that Visual Studio's biggest let down is the Javascript editor. I have
I think that the zipper is a beautiful idea; it elegantly provides a way
Do you think that writing about software (i.e. having a blog) and speaking on
I would like to think that some of the software I'm writing today will

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.