You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The unary indirection operator (__*__) accesses a value indirectly, through a pointer. The operand must be a pointer type. The result of the operation is the value addressed by the operand; that is, the value at the address to which its operand points. The type of the result is the type that the operand addresses.
10
+
The unary indirection operator (**`*`**) accesses a value indirectly, through a pointer. The operand must be a pointer type. The result of the operation is the value addressed by the operand; that is, the value at the address to which its operand points. The type of the result is the type that the operand addresses.
11
11
12
12
The result of the indirection operator is *type* if the operand is of type *pointer to type*. If the operand points to a function, the result is a function designator. If it points to an object, the result is an lvalue that designates the object.
13
13
@@ -21,9 +21,9 @@ If the pointer value is not valid, the result of the indirection operator is und
21
21
22
22
- The pointer specifies an address not used by the executing program.
23
23
24
-
The unary address-of operator (**&**) gives the address of its operand. The operand must be either an lvalue that designates an object that is not declared __register__ and is not a bit-field, or the result of a unary __*__ operator or an array dereference (__[]__) operator, or a function designator. The result is of type *pointer to type* for an operand of type *type*.
24
+
The unary address-of operator (**&**) gives the address of its operand. The operand must be either an lvalue that designates an object that is not declared __register__ and is not a bit-field, or the result of a unary **`*`** operator or an array dereference (__[]__) operator, or a function designator. The result is of type *pointer to type* for an operand of type *type*.
25
25
26
-
If the operand is the result of a unary __*__ operator, neither operator is evaluated and the result is as if both were omitted. The result is not an lvalue, and the constraints on the operators still apply. If the operand is the result of a __[]__ operator, neither the __&__ operator nor the unary __*__ implied by the __[]__ operator is evaluated. The result has the same effect as removing the __&__ operator and changing the __[]__ operator to a __+__ operator. Otherwise, the result is a pointer to the object or function designated by the operand.
26
+
If the operand is the result of a unary **`*`** operator, neither operator is evaluated and the result is as if both were omitted. The result is not an lvalue, and the constraints on the operators still apply. If the operand is the result of a __[]__ operator, neither the __&__ operator nor the unary **`*`** implied by the __[]__ operator is evaluated. The result has the same effect as removing the __&__ operator and changing the __[]__ operator to a __+__ operator. Otherwise, the result is a pointer to the object or function designated by the operand.
27
27
28
28
## Examples
29
29
@@ -41,7 +41,7 @@ This statement uses the address-of operator (**&**) to take the address of the s
41
41
pa = &a[5];
42
42
```
43
43
44
-
The indirection operator (__*__) is used in this example to access the **`int`** value at the address stored in `pa`. The value is assigned to the integer variable `x`:
44
+
The indirection operator (**`*`**) is used in this example to access the **`int`** value at the address stored in `pa`. The value is assigned to the integer variable `x`:
45
45
46
46
```C
47
47
x = *pa;
@@ -67,5 +67,5 @@ Once the function `roundup` is declared, two pointers to `roundup` are declared
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/fdopen-wfdopen.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ For more information about these and other error codes, see [_doserrno, errno, _
45
45
46
46
The **_fdopen** function associates an I/O stream with the file that is identified by *fd*, and thus allows a file that is opened for low-level I/O to be buffered and formatted. **_wfdopen** is a wide-character version of **_fdopen**; the *mode* argument to **_wfdopen** is a wide-character string. **_wfdopen** and **_fdopen** otherwise behave identically.
47
47
48
-
File descriptors passed into **_fdopen** are owned by the returned **FILE *** stream. If **_fdopen** is successful, do not call [\_close](close.md) on the file descriptor. Calling [fclose](fclose-fcloseall.md) on the returned **FILE *** also closes the file descriptor.
48
+
File descriptors passed into **_fdopen** are owned by the returned `FILE *` stream. If **_fdopen** is successful, do not call [\_close](close.md) on the file descriptor. Calling [fclose](fclose-fcloseall.md) on the returned `FILE *` also closes the file descriptor.
49
49
50
50
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/mbsrtowcs-s.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,13 +82,13 @@ The destination string *wcstr* is always null-terminated, even in the case of an
82
82
83
83
If *count* is the special value [_TRUNCATE](../../c-runtime-library/truncate.md), **mbsrtowcs_s** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator.
84
84
85
-
If **mbsrtowcs_s** successfully converts the source string, it puts the size in wide characters of the converted string and the null terminator into **pReturnValue*, provided *pReturnValue* is not a null pointer. This occurs even if the *wcstr* argument is a null pointer and lets you determine the required buffer size. Note that if *wcstr* is a null pointer, *count* is ignored.
85
+
If **mbsrtowcs_s** successfully converts the source string, it puts the size in wide characters of the converted string and the null terminator into `*pReturnValue`, provided *pReturnValue* is not a null pointer. This occurs even if the *wcstr* argument is a null pointer and lets you determine the required buffer size. Note that if *wcstr* is a null pointer, *count* is ignored.
86
86
87
87
If *wcstr* is not a null pointer, the pointer object pointed to by *mbstr* is assigned a null pointer if conversion stopped because a terminating null character was reached. Otherwise, it is assigned the address just past the last multibyte character converted, if any. This allows a subsequent function call to restart conversion where this call stopped.
88
88
89
89
If *mbstate* is a null pointer, the library internal **mbstate_t** conversion state static object is used. Because this internal static object is not thread-safe, we recommend that you pass your own *mbstate* value.
90
90
91
-
If **mbsrtowcs_s** encounters a multibyte character that is not valid in the current locale, it puts -1 in **pReturnValue*, sets the destination buffer *wcstr* to an empty string, sets **errno** to **EILSEQ**, and returns **EILSEQ**.
91
+
If **mbsrtowcs_s** encounters a multibyte character that is not valid in the current locale, it puts -1 in `*pReturnValue`, sets the destination buffer *wcstr* to an empty string, sets **errno** to **EILSEQ**, and returns **EILSEQ**.
92
92
93
93
If the sequences pointed to by *mbstr* and *wcstr* overlap, the behavior of **mbsrtowcs_s** is undefined. **mbsrtowcs_s** is affected by the LC_TYPE category of the current locale.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,9 +96,9 @@ The destination string is always null-terminated (even in the case of an error).
96
96
97
97
If *`count`* is the special value [`_TRUNCATE`](../../c-runtime-library/truncate.md), then **`mbstowcs_s`** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator.
98
98
99
-
If **`mbstowcs_s`** successfully converts the source string, it puts the size in wide characters of the converted string, including the null terminator, into **pReturnValue* (provided *`pReturnValue`* is not **`NULL`**). This occurs even if the *`wcstr`* argument is **`NULL`** and provides a way to determine the required buffer size. Note that if *`wcstr`* is **`NULL`**, *count* is ignored, and *`sizeInWords`* must be 0.
99
+
If **`mbstowcs_s`** successfully converts the source string, it puts the size in wide characters of the converted string, including the null terminator, into `*pReturnValue` (provided *`pReturnValue`* is not **`NULL`**). This occurs even if the *`wcstr`* argument is **`NULL`** and provides a way to determine the required buffer size. Note that if *`wcstr`* is **`NULL`**, *count* is ignored, and *`sizeInWords`* must be 0.
100
100
101
-
If **`mbstowcs_s`** encounters an invalid multibyte character, it puts 0 in **pReturnValue*, sets the destination buffer to an empty string, sets **`errno`** to **`EILSEQ`**, and returns **`EILSEQ`**.
101
+
If **`mbstowcs_s`** encounters an invalid multibyte character, it puts 0 in `*pReturnValue`, sets the destination buffer to an empty string, sets **`errno`** to **`EILSEQ`**, and returns **`EILSEQ`**.
102
102
103
103
If the sequences pointed to by *`mbstr`* and *`wcstr`* overlap, the behavior of **`mbstowcs_s`** is undefined.
As the table of generic-text routine mappings indicates (see [Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md)), when the manifest constant **_MBCS** is defined, a given generic-text routine maps to one of the following kinds of routines:
14
14
15
-
- An SBCS routine that handles multibyte bytes, characters, and strings appropriately. In this case, the string arguments are expected to be of type **char***. For example, **_tprintf** maps to **printf**; the string arguments to **printf** are of type **char***. If you use the **_TCHAR** generic-text data type for your string types, the formal and actual parameter types for **printf** match because **_TCHAR*** maps to **char***.
15
+
- An SBCS routine that handles multibyte bytes, characters, and strings appropriately. In this case, the string arguments are expected to be of type `char*`. For example, **_tprintf** maps to **printf**; the string arguments to **printf** are of type `char*`. If you use the **_TCHAR** generic-text data type for your string types, the formal and actual parameter types for **printf** match because `_TCHAR*` maps to `char*`.
16
16
17
-
- An MBCS-specific routine. In this case, the string arguments are expected to be of type __unsigned char*__. For example, **_tcsrev** maps to **_mbsrev**, which expects and returns a string of type __unsigned char*__. Again, if you use the **_TCHAR** generic-text data type for your string types, there's a potential type conflict because **_TCHAR** maps to type **`char`**.
17
+
- An MBCS-specific routine. In this case, the string arguments are expected to be of type `unsigned char*`. For example, **_tcsrev** maps to **_mbsrev**, which expects and returns a string of type `unsigned char*`. Again, if you use the **_TCHAR** generic-text data type for your string types, there's a potential type conflict because **_TCHAR** maps to type **`char`**.
18
18
19
19
Following are three solutions for preventing this type conflict (and the C compiler warnings or C++ compiler errors that would result):
20
20
@@ -24,7 +24,7 @@ Following are three solutions for preventing this type conflict (and the C compi
24
24
char *_tcsrev(char *);
25
25
```
26
26
27
-
In the default case, the prototype for **_tcsrev** maps to **_mbsrev** through a thunk in LIBC.LIB. This changes the types of the **_mbsrev** incoming parameters and outgoing return value from **_TCHAR *** (such as **char ***) to **unsigned char ***. This method ensures type matching when you're using **_TCHAR**, but it's relatively slow because of the function call overhead.
27
+
In the default case, the prototype for **_tcsrev** maps to **_mbsrev** through a thunk in LIBC.LIB. This changes the types of the **_mbsrev** incoming parameters and outgoing return value from `_TCHAR*` (such as `char*`) to `unsigned char*`. This method ensures type matching when you're using **_TCHAR**, but it's relatively slow because of the function call overhead.
28
28
29
29
- Use function inlining by incorporating the following preprocessor statement in your code.
Generics authored in one .NET (or UWP) language may be used in other languages. Unlike templates, a generic in a compiled assembly still remains generic. Thus, one may instantiate the generic type in a different assembly and even in a different language than the assembly in which the generic type was defined.
12
12
13
-
## Example: Generic class defined in C#
13
+
## Example: Generic class defined in C\#
14
14
15
15
This example shows a generic class defined in C#.
16
16
@@ -70,7 +70,7 @@ public class CircularList<ItemType> {
70
70
}
71
71
```
72
72
73
-
## Example: Consume assembly authored in C#
73
+
## Example: Consume assembly authored in C\#
74
74
75
75
This example consumes the assembly authored in C#.
Copy file name to clipboardExpand all lines: docs/mfc/managing-the-state-data-of-mfc-modules.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This article discusses the state data of MFC modules and how this state is updat
14
14
15
15
As shown in the following figure, MFC has state data for each module used in an application. Examples of this data include Windows instance handles (used for loading resources), pointers to the current `CWinApp` and `CWinThread` objects of an application, OLE module reference counts, and a variety of maps that maintain the connections between Windows object handles and corresponding instances of MFC objects. However, when an application uses multiple modules, the state data of each module is not application wide. Rather, each module has its own private copy of the MFC's state data.
16
16
17
-
") <br/>
17
+
 <br/>
18
18
State Data of a Single Module (Application)
19
19
20
20
A module's state data is contained in a structure and is always available via a pointer to that structure. When the flow of execution enters a particular module, as shown in the following figure, that module's state must be the "current" or "effective" state. Therefore, each thread object has a pointer to the effective state structure of that application. Keeping this pointer updated at all times is vital to managing the application's global state and maintaining the integrity of each module's state. Incorrect management of the global state can lead to unpredictable application behavior.
0 commit comments