CCN5413 exception

An access specifier determines the accessibility of members that follow it, either until the next access specifier or until the end of the class definition. Violation of this rule will result in the following error message:
CCN5413:"A::B" is already declared with a different access

If you later define a class member within its class definition, its access specification must be the same as its declaration. The code in Figure 1 violates this rule.

Figure 1. Code that results in CCN5413 exceptions
class A {
  public:
    class B;
      private:
    class B {};       1 
};
Note: The compiler will not allow the definition of class B because this class has already been declared as private. To correct the program, remove the private keyword.