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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:06:04+00:00 2026-05-20T01:06:04+00:00

Besides the normal explenation of being visible or not to derived classes, is their

  • 0

Besides the normal explenation of being visible or not to derived classes, is their any other difference?

If you make it more visible, is it taking more or less memory, does it slow thing down or…?

  • 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-20T01:06:05+00:00Added an answer on May 20, 2026 at 1:06 am

    Apart from the accessibility of members outside or to the derived classes, access specifiers might affect the object layout.

    Quoting from my other answer:

    Usually, memory address for data members increases in the order they’re defined in the class . But this order may be disrupted at any place where the access-specifiers (private, protected, public) are encountered. This has been discussed in great detail in Inside the C++ Object Model by Lippman.

    An excerpt from C/C++ Users Journal,

    The compiler isn’t allowed to do this
    rearrangement itself, though. The
    standard requires that all data that’s
    in the same public:, protected:, or
    private: must be laid out in that
    order by the compiler. If you
    intersperse your data with access
    specifiers, though, the compiler is
    allowed to rearrange the
    access-specifier-delimited blocks of
    data to improve the layout
    , which is
    why some people like putting an access
    specifier in front of every data
    member
    .

    Interesting, isn’t it?

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

Sidebar

Related Questions

Besides missing some of the benefits of Event Sourcing, are there any other drawbacks
Today we had a lot more activity than normal between our Ruby on Rails
Besides using script or an iframe, is there any way to get independently operating
Are there any hacks around the normal (and infuriating) Visual Studio Deploy Solution numbering
C++: for(i=0,j=0;i<0;i++,j++) What's the equivalence to this in ruby? Besides the normal for ,
I see people using LEFT JOIN in their mysql queries to fetch data from
Possible Duplicate: Difference between void main and int main? Alright, so I'm using bloodshed
Besides the obvious differences between JavaScript and Java, what are the relevant differences in
I got a table with a normal setup of auto inc. ids. Some of
I'm trying to include a PHP file called includes.php which is not contained within

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.