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

The Archive Base Latest Questions

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

I have question with this same title here but now as I’ll present in

  • 0

I have question with this same title here but now as I’ll present in code below this seems to behave in the opposite way to the way explained to me in my first question with the same title. Ok code:

class LINT_rep
{
private:
    char* my_data_; //stores separately every single digit from a number
public:
    class Iterator:public iterator<bidirectional_operator_tag,char>
        {
private: 
char* myData_
public:
        Iterator(const LINT_rep&);
    };
};

#include "StdAfx.h"
#include "LINT_rep.h"


LINT_rep::Iterator::Iterator(const LINT_rep& owner):myData_(nullptr)
{
    myData_ = owner.my_data_; /*
        HERE I'M ACCESSING my_data WHICH IS PRIVATE AND THIS   
        CODE COMPILES ON VS2010 ULTIMATE BUT IT SHOULDN'T  
        BECAUSE my_data IS PRIVATE AND OTHER CLASS SHOULDN'T  
        HAVE ACCESS TO IT'S PRIVATE MEMB. AS EXPLAINED TO ME IN  
        QUESTION TO WHICH I;VE PROVIDED LINK. */
}

Question in the code. Thanks.

  • 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-14T23:33:36+00:00Added an answer on May 14, 2026 at 11:33 pm

    Access rights for nested classes to members of the enclosing classes are changing in the upcoming C++0x standard. In the current standard, 11.8 says:

    The members of a nested class have no special access to members of an enclosing class

    In the draft for C++0x, this changes to

    A nested class is a member and as such has the same access rights as any other member

    Some compilers are adopting the new access rules; from your question, I guess VS2010 does, and I know from experience that GCC has done for some time.

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

Sidebar

Related Questions

Now I have seen this question in another forum but it didn't had an
I have a question about this question . I posted a reply there but
I have a question concerning this code which I want to run on QNX:
This question is related to (but perhaps not quite the same as): Does Django
I'm sorry for ambiguous title, but this question is hard for me to put
I have this question: Does implementing a custom MembershipProvider class needs you to implement
The responses I've got to this question have solved the problem I had in
I am new to C and i have this question. why does the following
I have seen this question: Are there any decent UI components for touch screen
I have a similar question to this one SQL products/productsales I want to do

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.