From 1ba799bb789f4ac4c3e7d8719bda8c5c599027be Mon Sep 17 00:00:00 2001 From: huihut Date: Thu, 24 Jul 2025 21:50:58 +0800 Subject: [PATCH] Fix using namespace_name https://github.com/huihut/interview/issues/121 --- README.md | 2 +- README_en.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 45d8f22..eea1aad 100644 --- a/README.md +++ b/README.md @@ -566,7 +566,7 @@ Derived(parms) : Base(args) { } `using 指示` 使得某个特定命名空间中所有名字都可见,这样我们就无需再为它们添加任何前缀限定符了。如: ```cpp -using namespace_name name; +using namespace namespace_name; ``` #### 尽量少使用 `using 指示` 污染命名空间 diff --git a/README_en.md b/README_en.md index 0ebb0e9..a30ea26 100644 --- a/README_en.md +++ b/README_en.md @@ -544,7 +544,7 @@ int main() A `using declaration` introduces only one member of a namespace at a time. It allows us to know exactly which name is referenced in the program. Such as: ```cpp -using namespace_name :: name; +using namespace_name::name; ``` #### Using declaration of constructor @@ -570,7 +570,7 @@ Derived (parms): Base (args) {} The `using directive` makes all names in a particular namespace visible, so we don't need to add any prefix qualifiers to them. Such as: ```cpp -using namespace_name name; +using namespace namespace_name; ``` #### Minimize `using directives` to pollute namespaces