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

I have an ObjectDataSource (but perhaps this question is the same for all kinds
I basically have the same question as this guy .. The example in the
Basically, I have the same question as this one , which unfortunately never got
I have basically the same problem outlined in this question, however I am using
Read about the issue in this stackoverflow question . Still have the same issue
This is probably an easy question... I have 4 source versions of the same
First: This is not a repeat of this question . Same script, but different
This question is related to (but perhaps not quite the same as): Does Django
First of all there is a question with the same title here on SO
i have asked this question before but no answer was there. so asking again.

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.