Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'identifier' : symbol cannot be defined within namespace 'namespace'
Remarks
A symbol belonging to namespace A must be defined in a namespace that encloses A.
Example
The following example generates C2888:
// C2888.cpp
// compile with: /c
namespace M {
   namespace N {
      void f1();
      void f2();
   }
   void N::f1() {}   // OK: namespace M encloses N
}
namespace O {
   void M::N::f2() {}   // C2888 namespace O does not enclose M
}