หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
'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
}