Last updated:2026-10-12
C++ Namespaces¶
About the Author:¶
Personal WeChat official account:

- Global scope operator (::name): used before a type name (class, class member, member function, variable, etc.) to indicate that the scope is the global namespace
- Class scope operator (class::name): used to indicate that the scope of the given type is a specific class
- Namespace scope operator (namespace::name): used to indicate that the scope of the given type is a specific namespace
For the concrete code see: maohao.cpp
Related Topics¶
- C++ Pure Virtual Functions and Abstract Classes | C++那些事
- C++ assert | C++那些事
- C++ Bit Fields | C++那些事
- Implementing C++ Polymorphism in C | C++那些事
- C++ const Constants and Qualifiers | C++那些事
- The Complete C++ const Family | C++那些事
- C++ Dereference Operator * | C++那些事
- C++ Initialization and Assignment | C++那些事
- Ways to Return Multiple Values in C++ | C++那些事
- C++ mutable Keyword | C++那些事