1 // Define same class name in different namespaces. 2 3 namespace Namespace1 { 4 class NamespaceClass { 5 public: NamespaceClass()6 NamespaceClass() : Member(0) {} 7 private: 8 int Member; 9 }; 10 } 11 12 namespace Namespace2 { 13 class NamespaceClass { 14 public: NamespaceClass()15 NamespaceClass() : Member(0) {} 16 private: 17 int Member; 18 }; 19 } 20 21