Skip to content

Commit 43cfbc5

Browse files
authored
Replace term "sample" with "example" for error references in range [C2651, C2670]
1 parent 270ac17 commit 43cfbc5

14 files changed

+22
-22
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c2652.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The first parameter in the copy constructor has the same type as the class, stru
1616

1717
## Example
1818

19-
The following sample generates C2651:
19+
The following example generates C2651:
2020

2121
```cpp
2222
// C2652.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2653.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ C2653 is also possible if you try to define a *compound namespace*, a namespace
1919

2020
## Examples
2121

22-
This sample generates C2653 because a scope name is used but not declared. The compiler expects a class, structure, union, or namespace name before a scope operator (::).
22+
This example generates C2653 because a scope name is used but not declared. The compiler expects a class, structure, union, or namespace name before a scope operator (::).
2323

2424
```cpp
2525
// C2653.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2655.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ An identifier can be redeclared only at global scope.
1616

1717
## Example
1818

19-
The following sample generates C2655:
19+
The following example generates C2655:
2020

2121
```cpp
2222
// C2655.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2657.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This error can be caused by a missing type specifier in the declaration of a poi
1818

1919
## Example
2020

21-
The following sample generates C2657:
21+
The following example generates C2657:
2222

2323
```cpp
2424
// C2657.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2658.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Two anonymous structures or unions contained member declarations with the same i
1616

1717
## Example
1818

19-
The following sample generates C2658:
19+
The following example generates C2658:
2020

2121
```cpp
2222
// C2658.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2660.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ C2660 can occur if you accidentally call a Windows API function rather than an M
2222

2323
## Examples
2424

25-
The following sample generates C2660.
25+
The following example generates C2660.
2626

2727
```cpp
2828
// C2660.cpp
@@ -34,7 +34,7 @@ int main() {
3434
}
3535
```
3636
37-
C2660 can also occur if you attempt to directly call the Dispose method of a managed type. For more information, see [Destructors and finalizers](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Destructors_and_finalizers). The following sample generates C2660.
37+
C2660 can also occur if you attempt to directly call the Dispose method of a managed type. For more information, see [Destructors and finalizers](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Destructors_and_finalizers). The following example generates C2660.
3838
3939
```cpp
4040
// C2660_a.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2661.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Possible causes:
2020

2121
## Example
2222

23-
The following sample generates C2661:
23+
The following example generates C2661:
2424

2525
```cpp
2626
// C2661.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2662.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This error can be caused by invoking a non-**`const`** member function on a **`c
2222

2323
## Examples
2424

25-
The following sample generates C2662:
25+
The following example generates C2662:
2626

2727
```cpp
2828
// C2662.cpp
@@ -64,7 +64,7 @@ ref struct N {
6464
};
6565
```
6666

67-
The following sample generates C2662:
67+
The following example generates C2662:
6868

6969
```cpp
7070
// C2662_c.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2663.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This error can be caused by invoking a non-**`const`** member function on a **`c
2222

2323
## Example
2424

25-
The following sample generates C2663:
25+
The following example generates C2663:
2626

2727
```cpp
2828
// C2663.cpp

docs/error-messages/compiler-errors-2/compiler-error-c2664.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For more information, see [How to: Convert System::String to wchar_t* or char\*]
2929

3030
## Examples
3131

32-
The following sample generates C2664 and shows how to fix it.
32+
The following example generates C2664 and shows how to fix it.
3333

3434
```cpp
3535
// C2664.cpp
@@ -51,7 +51,7 @@ int main() {
5151
}
5252
```
5353
54-
This sample also generates C2664 and shows how to fix it.
54+
This example also generates C2664 and shows how to fix it.
5555
5656
```cpp
5757
// C2664b.cpp
@@ -68,7 +68,7 @@ int main() {
6868
}
6969
```
7070

71-
The next sample demonstrates C2664 by using a string literal to call `Test`, and shows how to fix it. Because the parameter is an `szString` reference, an object must be created by the appropriate constructor. The result is a temporary object that cannot be used to initialize the reference.
71+
The next example demonstrates C2664 by using a string literal to call `Test`, and shows how to fix it. Because the parameter is an `szString` reference, an object must be created by the appropriate constructor. The result is a temporary object that cannot be used to initialize the reference.
7272

7373
```cpp
7474
// C2664c.cpp
@@ -107,7 +107,7 @@ int main() {
107107
}
108108
```
109109
110-
The compiler enforces the C++ standard requirements for applying **`const`**. This sample generates C2664:
110+
The compiler enforces the C++ standard requirements for applying **`const`**. This example generates C2664:
111111
112112
```cpp
113113
// C2664d.cpp
@@ -173,7 +173,7 @@ int main( ) {
173173
}
174174
```
175175
176-
An enum variable is not converted to its underlying type such that a function call will be satisfied. For more information, see [enum class](../../extensions/enum-class-cpp-component-extensions.md). The following sample generates C2664 and shows how to fix it.
176+
An enum variable is not converted to its underlying type such that a function call will be satisfied. For more information, see [enum class](../../extensions/enum-class-cpp-component-extensions.md). The following example generates C2664 and shows how to fix it.
177177
178178
```cpp
179179
// C2664f.cpp
@@ -216,7 +216,7 @@ library myproj1 {
216216

217217
C2664 is also raised by using **`wchar_t`** when porting code from Visual C++ 6.0 to later versions. In Visual C++ 6.0 and earlier, **`wchar_t`** was a **`typedef`** for **`unsigned short`** and was therefore implicitly convertible to that type. After Visual C++ 6.0, **`wchar_t`** is its own built-in type, as specified in the C++ standard, and is no longer implicitly convertible to **`unsigned short`**. See [/Zc:wchar_t (wchar_t Is Native Type)](../../build/reference/zc-wchar-t-wchar-t-is-native-type.md).
218218

219-
The following sample generates C2664 and shows how to fix it.
219+
The following example generates C2664 and shows how to fix it.
220220

221221
```cpp
222222
// C2664h.cpp

0 commit comments

Comments
 (0)