Skip to content

Commit fbf598c

Browse files
authored
Add file hint in namespaces-cpp.md (#4849)
1 parent 6675a70 commit fbf598c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/cpp/namespaces-cpp.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The **`using`** directive allows all the names in a **`namespace`** to be used w
6464
Typically, you declare a namespace in a header file. If your function implementations are in a separate file, then qualify the function names, as in this example.
6565
6666
```cpp
67-
//contosoData.h
67+
// contosoData.h
6868
#pragma once
6969
namespace ContosoDataServer
7070
{
@@ -144,7 +144,7 @@ Ordinary nested namespaces can be used to encapsulate internal implementation de
144144
In contrast to an ordinary nested namespace, members of an inline namespace are treated as members of the parent namespace. This characteristic enables argument dependent lookup on overloaded functions to work on functions that have overloads in a parent and a nested inline namespace. It also enables you to declare a specialization in a parent namespace for a template that is declared in the inline namespace. The following example shows how external code binds to the inline namespace by default:
145145

146146
```cpp
147-
//Header.h
147+
// Header.h
148148
#include <string>
149149

150150
namespace Test
@@ -160,6 +160,7 @@ namespace Test
160160
}
161161
}
162162

163+
// main.cpp
163164
#include "header.h"
164165
#include <string>
165166
#include <iostream>

0 commit comments

Comments
 (0)