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

  • Home
  • SEARCH
  • 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 8880175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:07:04+00:00 2026-06-14T20:07:04+00:00

A constructor assembles the execution environment for the member functions for a class from

  • 0

A constructor assembles the execution environment for the member
functions for a class from the bottom up (members first). The
destructor disassembles it from the top down (members last).

[from C++ programming language]

please can someone describe this? I understand that members functions means here members functions of the class, but what "members" first? is this related to function on the stack? what means "assembles the execution environment"?

  • 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-14T20:07:06+00:00Added an answer on June 14, 2026 at 8:07 pm

    The sentence is quite abstract. The execution environment of a a member function are the members of the class itself and members exposed by one of the base-classes.

    Presumably, what is meant by “assemble the execution environment”, is to initialize all members and bases of the class (note that member functions don’t need to be initialized).

    I don’t see how this would relate to an object being on the stack or not.

    An example:

    class X {
    public:
      X() // constructor initializes first a, then b, then c
      {
        // members are now accessible for member functions
        foo();
      }
    
      void foo() {
        // member function executes in the context of an object
        // a, b, and c mean this->a, this->b and this->
        std::cout << a << b << c << std::endl;
      }
    
      ~X() {} // destroys first c, then b and then a 
    private:
      int a;
      double b;
      char c;
    };
    

    Please note that you don’t need to write out the destructor in the
    above case. This is just done for exemplary purposes here.

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

Sidebar

Related Questions

I'm extending a constructor class' functionality via the prototype method, but I'm having trouble
I have a class constructor like this: public JavoImageCorrectedDataHeader() { ByteBuffer buffer = ByteBuffer.allocate(this.size());
I have a constructor method similar to this: public class Foo { public Foo
I have a class constructor that expects a reference to another class object to
Possible Duplicate: XmlSerializer giving FileNotFoundException at constructor I received the first chance exception when
Suppose I have a class with 3 constructors, a default (no argument) constructor, a
I'm trying to programmatically set the constructor sting of a COM+ component from a
is there any tool or utility(mapper assembly) to construct business objects from entities(which are
Constructor for PHP's exception has third parameter, documentation says: $previous: The previous exception used
Does a templated constructor (such as the following) override the implicit copy constructor? template

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.