mirror of
https://github.com/huihut/interview.git
synced 2025-12-18 21:14:38 +03:00
Fix using namespace_name
https://github.com/huihut/interview/issues/121
This commit is contained in:
@@ -566,7 +566,7 @@ Derived(parms) : Base(args) { }
|
||||
`using 指示` 使得某个特定命名空间中所有名字都可见,这样我们就无需再为它们添加任何前缀限定符了。如:
|
||||
|
||||
```cpp
|
||||
using namespace_name name;
|
||||
using namespace namespace_name;
|
||||
```
|
||||
|
||||
#### 尽量少使用 `using 指示` 污染命名空间
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user