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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:55:54+00:00 2026-05-23T19:55:54+00:00

According to the text I am referring to ( The Complete Reference by Herbert

  • 0

According to the text I am referring to (The Complete Reference by Herbert Schildt) a derived class doesn’t inherit friend functions and friend functions may not have a
storage-class specifier. That is, they may not be declared as static or extern. Why?

  • 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-23T19:55:55+00:00Added an answer on May 23, 2026 at 7:55 pm

    a derived class doesn’t inherit friend functions? […] why?

    Because that would break encapsulation: the derived class couldn’t control its friends any longer so it effectively cannot control who has access to its internals.

    they may not be declared as static or extern, why?

    Because static would make no sense (it only makes sense in functions belonging to a class, and friends are free functions), and extern would once again violate encapsulation because the class effectively cannot control any longer which function has access to it: due to being extern, the friend could effectively come from a different compilation unit, unknown to the class.

    See Jan’s answer for a correction.

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

Sidebar

Related Questions

I have the following text tooooooooooooon According to this book I'm reading, when the
I have a dynamic text file that picks content from a database according to
I need to make custom text field which will format numeric values according to
I am generating user control according to search result. And allowing to change text
According to this discussion , the iphone agreement says that it doesn't allow loading
i'm having a trouble to display text according to images i clicked on. <ul
i have a simple program that sorts a text file according to length of
According to this calculator site ( link text ), when converting 3 from decimal
What is the limit of character to use in alt=text according to WCAG 2.0?
I would like to edit a graphical text (not a TextBox control) through the

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.