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
Copy file name to clipboardExpand all lines: docs/atl-mfc-shared/string-data-management.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
@@ -57,7 +57,7 @@ Visual C++ provides several ways to manage string data:
57
57
A `CString` object can store up to INT_MAX (2,147,483,647) characters. The TCHAR data type is used to get or set individual characters inside a `CString` object. Unlike character arrays, the `CString` class has a built-in memory allocation capability. This allows `CString` objects to automatically grow as needed (that is, you do not have to worry about growing a `CString` object to fit longer strings).
58
58
59
59
## <aname="_core_cstrings_and_const_char_pointers"></a> CStrings and const char Pointers
60
-
A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as <strong>const char\*</strong> if not under Unicode). The [CSimpleStringT::operator PCXSTR](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The **CString( LPCWSTR**`pszSrc`**)** constructor allows character pointers to be substituted for `CString` objects.
60
+
A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as **const char**<strong>\*</strong> if not under Unicode). The [CSimpleStringT::operator PCXSTR](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The **CString( LPCWSTR**`pszSrc`**)** constructor allows character pointers to be substituted for `CString` objects.
61
61
62
62
No attempt is made to fold `CString` objects. If you make two `CString` objects containing `Chicago`, for example, the characters in `Chicago` are stored in two places. (This may not be true of future versions of MFC, so you should not depend on it.)
Copy file name to clipboardExpand all lines: docs/atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,9 +50,9 @@ To complete Unicode programming of your application, you must also:
50
50
51
51
- Use TCHAR where you would use **char**.
52
52
53
-
- Use LPTSTR where you would use <strong>char\*</strong>.
53
+
- Use LPTSTR where you would use **char**<strong>\*</strong>.
54
54
55
-
- Use LPCTSTR where you would use <strong>const char\*</strong>. `CString` provides the operator LPCTSTR to convert between `CString` and LPCTSTR.
55
+
- Use LPCTSTR where you would use **const char**<strong>\*</strong>. `CString` provides the operator LPCTSTR to convert between `CString` and LPCTSTR.
56
56
57
57
`CString` also supplies Unicode-aware constructors, assignment operators, and comparison operators.
58
58
@@ -84,7 +84,7 @@ Under DBCS, a given string can contain all single-byte ANSI characters, all doub
84
84
85
85
Generic-text function mappings for all of the run-time string-handling routines are discussed in [C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md). For a list, see [Internationalization](../c-runtime-library/internationalization.md).
86
86
87
-
Similarly, `CString` methods are implemented by using generic data type mappings. To enable both MBCS and Unicode, MFC uses TCHAR for **char** or `wchar_t`, LPTSTR for <strong>char\*</strong> or `wchar_t*`, and LPCTSTR for <strong>const char\*</strong> or `const wchar_t*`. These ensure the correct mappings for either MBCS or Unicode.
87
+
Similarly, `CString` methods are implemented by using generic data type mappings. To enable both MBCS and Unicode, MFC uses TCHAR for **char** or `wchar_t`, LPTSTR for **char**<strong>\*</strong> or `wchar_t*`, and LPCTSTR for **const char**<strong>\*</strong> or `const wchar_t*`. These ensure the correct mappings for either MBCS or Unicode.
Copy file name to clipboardExpand all lines: docs/atl/reference/cthreadpool-class.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
@@ -58,7 +58,7 @@ class CThreadPool : public IThreadPoolConfig
58
58
## Remarks
59
59
Threads in the pool are created and destroyed when the pool is initialized, resized, or shut down. An instance of class *Worker* will be created on the stack of each worker thread in the pool. Each instance will live for the lifetime of the thread.
60
60
61
-
Immediately after creation of a thread, *Worker*::`Initialize` will be called on the object associated with that thread. Immediately before destruction of a thread, *Worker*::`Terminate` will be called. Both methods must accept a <strong>void\*</strong> argument. The value of this argument is passed to the thread pool through the *pvWorkerParam* parameter of [CThreadPool::Initialize](#initialize).
61
+
Immediately after creation of a thread, *Worker*::`Initialize` will be called on the object associated with that thread. Immediately before destruction of a thread, *Worker*::`Terminate` will be called. Both methods must accept a **void**<strong>\*</strong> argument. The value of this argument is passed to the thread pool through the *pvWorkerParam* parameter of [CThreadPool::Initialize](#initialize).
62
62
63
63
When there are work items in the queue and worker threads available for work, a worker thread will pull an item off the queue and call the `Execute` method of the *Worker* object for that thread. Three items are then passed to the method: the item from the queue, the same `pvWorkerParam` passed to *Worker*:: `Initialize` and *Worker*:: `Terminate`, and a pointer to the [OVERLAPPED](http://msdn.microsoft.com/library/windows/desktop/ms684342) structure used for the IO completion port queue.
Copy file name to clipboardExpand all lines: docs/c-language/c-type-specifiers.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
@@ -68,7 +68,7 @@ pi = pu; /* Now generates warning */
68
68
69
69
Type **void** expressions are evaluated for side effects. You cannot use the (nonexistent) value of an expression that has type **void** in any way, nor can you convert a **void** expression (by implicit or explicit conversion) to any type except **void**. If you do use an expression of any other type in a context where a **void** expression is required, its value is discarded.
70
70
71
-
To conform to the ANSI specification, <strong>void\*\*</strong> cannot be used as <strong>int\*\*</strong>. Only <strong>void\*</strong> can be used as a pointer to an unspecified type.
71
+
To conform to the ANSI specification, <strong>void\*\*</strong> cannot be used as <strong>int\*\*</strong>. Only **void**<strong>\*</strong> can be used as a pointer to an unspecified type.
Copy file name to clipboardExpand all lines: docs/c-language/conversions-to-and-from-pointer-types.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
@@ -30,7 +30,7 @@ A pointer to one type of value can be converted to a pointer to a different type
30
30
31
31
- If the size of the integral type is different from the size of the pointer type, the integral type is first converted to the size of the pointer, using the conversion paths given in the tables [Conversion from Signed Integral Types](../c-language/conversions-from-signed-integral-types.md) and [Conversion from Unsigned Integral Types](../c-language/conversions-from-unsigned-integral-types.md). It is then treated as a pointer value.
32
32
33
-
An integral constant expression with value 0 or such an expression cast to type <strong>void \*</strong> can be converted by a type cast, by assignment, or by comparison to a pointer of any type. This produces a null pointer that is equal to another null pointer of the same type, but this null pointer is not equal to any pointer to a function or to an object. Integers other than the constant 0 can be converted to pointer type, but the result is not portable.
33
+
An integral constant expression with value 0 or such an expression cast to type **void**<strong>\*</strong> can be converted by a type cast, by assignment, or by comparison to a pointer of any type. This produces a null pointer that is equal to another null pointer of the same type, but this null pointer is not equal to any pointer to a function or to an object. Integers other than the constant 0 can be converted to pointer type, but the result is not portable.
Copy file name to clipboardExpand all lines: docs/c-language/pointer-declarations.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
@@ -36,7 +36,7 @@ A "pointer declaration" names a pointer variable and specifies the type of the o
36
36
37
37
The *type-specifier* gives the type of the object, which can be any basic, structure, or union type. Pointer variables can also point to functions, arrays, and other pointers. (For information on declaring and interpreting more complex pointer types, refer to [Interpreting More Complex Declarators](../c-language/interpreting-more-complex-declarators.md).)
38
38
39
-
By making the *type-specifier***void**, you can delay specification of the type to which the pointer refers. Such an item is referred to as a "pointer to **void**" and is written as `void *`. A variable declared as a pointer to *void* can be used to point to an object of any type. However, to perform most operations on the pointer or on the object to which it points, the type to which it points must be explicitly specified for each operation. (Variables of type <strong>char \*</strong> and type <strong>void \*</strong> are assignment-compatible without a type cast.) Such conversion can be accomplished with a type cast (see [Type-Cast Conversions](../c-language/type-cast-conversions.md) for more information).
39
+
By making the *type-specifier***void**, you can delay specification of the type to which the pointer refers. Such an item is referred to as a "pointer to **void**" and is written as `void *`. A variable declared as a pointer to *void* can be used to point to an object of any type. However, to perform most operations on the pointer or on the object to which it points, the type to which it points must be explicitly specified for each operation. (Variables of type **char**<strong>\*</strong> and type **void**<strong>\*</strong> are assignment-compatible without a type cast.) Such conversion can be accomplished with a type cast (see [Type-Cast Conversions](../c-language/type-cast-conversions.md) for more information).
40
40
41
41
The *type-qualifier* can be either **const** or **volatile**, or both. These specify, respectively, that the pointer cannot be modified by the program itself (**const**), or that the pointer can legitimately be modified by some process beyond the control of the program (**volatile**). (See [Type Qualifiers](../c-language/type-qualifiers.md) for more information on **const** and **volatile**.)
Copy file name to clipboardExpand all lines: docs/c-language/type-cast-conversions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,22 +32,22 @@ You can use type casts to explicitly convert types.
32
32
|-----------------------|-----------------------|
33
33
|Integral types|Any integer type or floating-point type, or pointer to an object|
34
34
|Floating-point|Any arithmetic type|
35
-
|A pointer to an object, or (<strong>void \*</strong>)|Any integer type, (<strong>void \*</strong>), a pointer to an object, or a function pointer|
35
+
|A pointer to an object, or (**void**<strong>\*</strong>)|Any integer type, (**void**<strong>\*</strong>), a pointer to an object, or a function pointer|
36
36
|Function pointer|Any integral type, a pointer to an object, or a function pointer|
37
37
|A structure, union, or array|None|
38
38
|Void type|Any type|
39
39
40
40
Any identifier can be cast to `void` type. However, if the type specified in a type-cast expression is not `void`, then the identifier being cast to that type cannot be a `void` expression. Any expression can be cast to `void`, but an expression of type `void` cannot be cast to any other type. For example, a function with `void` return type cannot have its return cast to another type.
41
41
42
-
Note that a <strong>void \*</strong> expression has a type pointer to `void`, not type `void`. If an object is cast to `void` type, the resulting expression cannot be assigned to any item. Similarly, a type-cast object is not an acceptable l-value, so no assignment can be made to a type-cast object.
42
+
Note that a **void**<strong>\*</strong> expression has a type pointer to `void`, not type `void`. If an object is cast to `void` type, the resulting expression cannot be assigned to any item. Similarly, a type-cast object is not an acceptable l-value, so no assignment can be made to a type-cast object.
43
43
44
44
**Microsoft Specific**
45
45
46
46
A type cast can be an l-value expression as long as the size of the identifier does not change. For information on l-value expressions, see [L-Value and R-Value Expressions](../c-language/l-value-and-r-value-expressions.md).
47
47
48
48
**END Microsoft Specific**
49
49
50
-
You can convert an expression to type `void` with a cast, but the resulting expression can be used only where a value is not required. An object pointer converted to <strong>void \*</strong> and back to the original type will return to its original value.
50
+
You can convert an expression to type `void` with a cast, but the resulting expression can be used only where a value is not required. An object pointer converted to **void**<strong>\*</strong> and back to the original type will return to its original value.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/localeconv.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
@@ -54,7 +54,7 @@ n_sep_by_space|Set to 1 if currency symbol is separated by space from value for
54
54
p_sign_posn|Position of positive sign in nonnegative formatted monetary quantities.
55
55
n_sign_posn|Position of positive sign in negative formatted monetary quantities.
56
56
57
-
Except as specified, members of the **lconv** structure that have `char *` and `wchar_t *` versions are pointers to strings. Any of these that equals **""** (or **L""** for <strong>wchar_t \*</strong>) is either of zero length or not supported in the current locale. Note that **decimal_point** and **_W_decimal_point** are always supported and of nonzero length.
57
+
Except as specified, members of the **lconv** structure that have `char *` and `wchar_t *` versions are pointers to strings. Any of these that equals **""** (or **L""** for **wchar_t** <strong>\*</strong>) is either of zero length or not supported in the current locale. Note that **decimal_point** and **_W_decimal_point** are always supported and of nonzero length.
58
58
59
59
The **char** members of the structure are small nonnegative numbers, not characters. Any of these that equals **CHAR_MAX** is not supported in the current locale.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.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
@@ -114,7 +114,7 @@ int main()
114
114
}
115
115
```
116
116
117
-
Notice that **testit** expects its second parameter to be either an **int** or a <strong>char\*</strong>. The arguments being passed are 0xffffffff (an **unsigned** **int**, not an **int**) and **NULL** (actually an **int**, not a <strong>char\*</strong>). When the program is compiled for native code, it produces this output:
117
+
Notice that **testit** expects its second parameter to be either an **int** or a **char**<strong>\*</strong>. The arguments being passed are 0xffffffff (an **unsigned** **int**, not an **int**) and **NULL** (actually an **int**, not a **char**<strong>\*</strong>). When the program is compiled for native code, it produces this output:
Copy file name to clipboardExpand all lines: docs/c-runtime-library/sbcs-and-mbcs-data-types.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
@@ -21,7 +21,7 @@ Any Microsoft MBCS run-time library routine that handles only one multibyte char
21
21
22
22
Therefore it is best to represent a byte of a multibyte character as an 8-bit `unsigned char`. Or, to avoid a negative result, simply convert a single-byte character of type **char** to an `unsigned char` before converting it to an **int** or a **long**.
23
23
24
-
Because some SBCS string-handling functions take (signed) <strong>char\*</strong> parameters, a type mismatch compiler warning will result when **_MBCS** is defined. There are three ways to avoid this warning, listed in order of efficiency:
24
+
Because some SBCS string-handling functions take (signed) **char**<strong>\*</strong> parameters, a type mismatch compiler warning will result when **_MBCS** is defined. There are three ways to avoid this warning, listed in order of efficiency:
25
25
26
26
1. Use the type-safe inline functions in TCHAR.H. This is the default behavior.
0 commit comments