Skip to content

Commit 7418285

Browse files
TylerMSFTTylerMSFT
authored andcommitted
acrolinx
1 parent e935dc2 commit 7418285

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

docs/cpp/casting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
description: "Learn more about: Casting in C++"
33
title: "Casting"
4-
ms.date: 6/10/2024
4+
ms.date: 6/11/2024
55
helpviewer_keywords: ["casting [C++]", "coercion [C++]", "virtual functions [C++], in derived classes [C++]", "static cast operator", "dynamic cast operator", "polymorphic classes [C++]", "classes [C++], polymorphism"]
66
ai.
77
---
88
# Casting
99

1010
The C++ language provides that if a class is derived from a base class containing virtual functions, a pointer to that base class type can be used to call virtual functions in the derived class object. A class containing virtual functions is sometimes called a "polymorphic class".
1111

12-
![Diagram of a class hierarchy where C derives from B, which derives from A.](../cpp/media/vc38zz1.gif "Class hierarchy") <br/>
12+
![Diagram of a class hierarchy where C derives from B, which derives from A.](../cpp/media/vc38zz1.gif "Class hierarchy")<br/>
1313
Class hierarchy
1414

1515
An object of type `C` could be visualized as shown in the following figure.

docs/cpp/data-type-ranges.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The Microsoft C++ 32-bit and 64-bit compilers recognize the types in the table l
1919
- long long (unsigned long long)
2020
```
2121
22-
If its name begins with two underscores (`__`), the data type is non-standard.
22+
If its name begins with two underscores (`__`), the data type is nonstandard.
2323
2424
The ranges specified in the following table are inclusive-inclusive.
2525
@@ -46,16 +46,16 @@ The ranges specified in the following table are inclusive-inclusive.
4646
|**`long long`**|8|none (but equivalent to **`__int64`**)|-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807|
4747
|**`unsigned long long`**|8|none (but equivalent to **`unsigned __int64`**)|0 to 18,446,744,073,709,551,615|
4848
|**`enum`**|varies|none| |
49-
|**`float`**|4|none|3.4E +/- 38 (7 digits)|
50-
|**`double`**|8|none|1.7E +/- 308 (15 digits)|
49+
|**`float`**|4|none|3.4E +/- 38 (seven digits)|
50+
|**`double`**|8|none|1.7E +/- 308 (fifteen digits)|
5151
|**`long double`**|same as **`double`**|none|Same as **`double`**|
5252
|**`wchar_t`**|2|**`__wchar_t`**|0 to 65,535|
5353
54-
Depending on how it's used, a variable of **`__wchar_t`** designates either a wide-character type or multibyte-character type. Use the `L` prefix before a character or string constant to designate the wide-character-type constant.
54+
A variable of **`__wchar_t`** designates either a wide-character type or multibyte-character type. Use the `L` prefix before a character or string constant to designate the wide-character-type constant.
5555
5656
**`signed`** and **`unsigned`** are modifiers that you can use with any integral type except **`bool`**. Note that **`char`**, **`signed char`**, and **`unsigned char`** are three distinct types for the purposes of mechanisms like overloading and templates.
5757
58-
The **`int`** and **`unsigned int`** types have a size of four bytes. However, portable code should not depend on the size of **`int`** because the language standard allows this to be implementation-specific.
58+
The **`int`** and **`unsigned int`** types have a size of 4 bytes. However, portable code shouldn't depend on the size of **`int`** because the language standard allows this to be implementation-specific.
5959
6060
C/C++ in Visual Studio also supports sized integer types. For more information, see [`__int8, __int16, __int32, __int64`](../cpp/int8-int16-int32-int64.md) and [Integer Limits](../cpp/integer-limits.md).
6161

docs/error-messages/compiler-errors-1/compiler-error-c2055.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ helpviewer_keywords: ["C2055"]
99

1010
> expected formal parameter list, not a type list
1111
12-
A function definition contains a parameter type list instead of a formal parameter list. ANSI C requires formal parameters to be named unless they are void or an ellipsis (`...`).
12+
A function definition contains a parameter type list instead of a formal parameter list. ANSI C requires formal parameters to be named unless they're `void` or an ellipsis (`...`).
1313

14-
An example of a named formal parameter is the `int i` in `void func(int i)`. A parameter type list is a list of types, for example, `int, char`.
14+
An example of a named formal parameter is the `int i` in `void func(int i)`.\
15+
A parameter type list is a list of types, for example, `int, char`.
1516

16-
The following generates error `C2055`:
17+
The following code generates error `C2055`:
1718

1819
```c
1920
// C2055.c

docs/standard-library/mutex-class-stl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ If the calling thread already owns the `mutex`, the behavior is undefined.
5454
## <a name="mutex"></a> Constructor
5555

5656
Constructs a `mutex` object that isn't locked.\
57-
Prior to Visual Studio 2022 17.10, Microsoft's implementation of this constructor wasn't `constexpr`. Now it is `constexpr`.
57+
Before Visual Studio 2022 17.10, Microsoft's implementation of this constructor wasn't `constexpr`. Now it's `constexpr`.
5858

5959
```cpp
6060
mutex() noexcept;
@@ -82,7 +82,7 @@ native_handle_type native_handle();
8282

8383
### Return Value
8484

85-
`native_handle_type` is defined as a `Concurrency::critical_section *` that's cast as `void *`.
85+
`native_handle_type` is defined as a `Concurrency::critical_section *`. It's cast as `void *`.
8686

8787
## <a name="try_lock"></a> `try_lock`
8888

0 commit comments

Comments
 (0)