Skip to content

Commit 67b10ce

Browse files
Taojunshen3836425+corob-msft@users.noreply.github.comopbld16TylerMSFTTylerMSFT
authored
2/11/2021 AM Publish (MicrosoftDocs#4093)
* Change __STDC__ documentation for 17.2 * Twhitney updateui (#4082) * update ui steps * simplify * fix formatting * try a note * formatting * bridge the note * edits * edits * acrolinx * Update docs/build/walkthrough-header-units.md Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Shannon Leavitt <[email protected]> * Fix link to CreateProcess function * Update exception-handling-x64.md * US1907300 - add md code escapes to code elements - PR9 * Address cpp-docs 3691, 3688, 3684, 3664 (MicrosoftDocs#4085) * [17.2p1] Add /scanDependencies option to docs (MicrosoftDocs#4059) * Add /scanDependencies option to docs * Acrolinx pass * Updates per review by Cameron * Consistency of command option formatting * Add IDE instructions * Tweaks per comments. * US1907300 - add md code escapes to code elements - PR7 (MicrosoftDocs#4076) * US1907300 - add md code escapes to code elements - PR7 * US1907300 - add md code escapes to code elements - PR7 * updates after review * updates after review * updates after review * updates after review * updates after review * US1907300 - add md code escapes to code elements - PR8 (MicrosoftDocs#4080) * US1907300 - add md code escapes to code elements - PR8 * updates after review * updates after review * updates after review * fix blocking issue * Address DD 1462641 (MicrosoftDocs#4086) * US1907300 - add md code escapes to code elements - PR9 * fix formatting issue * US1907300 - add md code escapes to code elements - PR10 * updates after review * updates after review * updates after review * updates after review * updates after review Co-authored-by: [email protected] <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Shannon Leavitt <[email protected]> Co-authored-by: ishchukin <[email protected]> Co-authored-by: p4yl0ad <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Craig Casey <[email protected]> Co-authored-by: PRMerger9 <[email protected]> Co-authored-by: Dennis Rea <[email protected]>
1 parent 8fb81ed commit 67b10ce

20 files changed

+1709
-1726
lines changed

docs/atl-mfc-shared/strings-atl-mfc.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,25 @@ description: "Learn more about: Strings (ATL/MFC)"
33
title: "Strings (ATL-MFC)"
44
ms.date: "11/04/2016"
55
helpviewer_keywords: ["const char pointers", "strings [C++], in ATL", "MFC [C++], string handling class", "MBCS [C++], CString support", "strings [C++], class CStringT", "char pointers", "reference counting [C++]", "strings [C++], string operations", "portability [C++], Unicode and ANSI string objects", "literal strings [C++], class CString", "copying string objects", "ATL, string handling class", "strings [C++], in MFC", "strings [C++]", "C-style strings", "language portability [C++]", "strings [C++], class CString", "literal strings [C++], class CStringT"]
6-
ms.assetid: 3b33125b-1684-4542-a3a7-b00de7d0419e
76
---
87
# Strings (ATL/MFC)
98

109
Nearly all programs work with string data. Visual C++ provides several ways to manage this string data.
1110

1211
## In This Section
1312

14-
[Using CStringT](../atl-mfc-shared/using-cstringt.md)<br/>
15-
Describes programming using the template class CStringT.
13+
[Using `CStringT`](../atl-mfc-shared/using-cstringt.md)\
14+
Describes programming using the template class `CStringT`.
1615

17-
[Using CString](../atl-mfc-shared/using-cstring.md)<br/>
18-
Describes programming using CString, the default implementation of CStringT.
16+
[Using `CString`](../atl-mfc-shared/using-cstring.md)\
17+
Describes programming using `CString`, the default implementation of `CStringT`.
1918

2019
## Related Sections
2120

22-
[CStringT Overview](../atl-mfc-shared/reference/cstringt-class.md)<br/>
21+
[`CStringT` Overview](../atl-mfc-shared/reference/cstringt-class.md)\
2322
Provides reference information about the shared `CStringT` class.
2423

25-
[MFC Concepts](../mfc/mfc-concepts.md)<br/>
24+
[MFC Concepts](../mfc/mfc-concepts.md)\
2625
Provides conceptual and task-based topics to help you program using the MFC Library.
2726

2827
## See also

docs/atl/reference/cregkey-class.md

Lines changed: 292 additions & 293 deletions
Large diffs are not rendered by default.

docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ ms.date: "11/04/2016"
55
ms.topic: "reference"
66
ms.custom: contperf-fy21q1
77
helpviewer_keywords: ["width, specifications in scanf function", "scanf format specifications", "scanf width specifications", "scanf type field characters", "type fields, scanf function", "format specification fields for scanf function", "type fields"]
8-
ms.assetid: 7e95de1b-0b71-4de3-9f81-c9560c78e039
98
---
10-
# Format Specification Fields: scanf and wscanf Functions
9+
# Format Specification Fields: `scanf` and `wscanf` Functions
1110

1211
The information here applies to the entire `scanf` family of functions, including the secure versions and describes the symbols used to tell the `scanf` functions how to parse the input stream, such as the input stream `stdin` for `scanf`, into values that are inserted into program variables.
1312

@@ -17,7 +16,7 @@ A format specification has the following form:
1716

1817
The `format` argument specifies the interpretation of the input and can contain one or more of the following:
1918

20-
- White-space characters: blank (' '); tab ('\t'); or newline ('\n'). A white-space character causes `scanf` to read, but not store, all consecutive white-space characters in the input up to the next non-white-space character. One white-space character in the format matches any number (including 0) and combination of white-space characters in the input.
19+
- White-space characters: blank (` `); tab (`\t`); or newline (`\n`). A white-space character causes `scanf` to read, but not store, all consecutive white-space characters in the input up to the next non-white-space character. One white-space character in the format matches any number (including 0) and combination of white-space characters in the input.
2120

2221
- Non-white-space characters, except for the percent sign (`%`). A non-white-space character causes `scanf` to read, but not store, a matching non-white-space character. If the next character in the input stream does not match, `scanf` terminates.
2322

@@ -35,11 +34,11 @@ The simplest format specification contains only the percent sign and a `type` ch
3534

3635
An asterisk (`*`) following the percent sign suppresses assignment of the next input field, which is interpreted as a field of the specified type. The field is scanned but not stored.
3736

38-
The secure versions (those with the `_s` suffix) of the `scanf` family of functions require that a buffer size parameter be passed immediately following each parameter of type `c`, `C`, `s`, `S` or `[`. For more information on the secure versions of the `scanf` family of functions, see [scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md).
37+
The secure versions (those with the `_s` suffix) of the `scanf` family of functions require that a buffer size parameter be passed immediately following each parameter of type `c`, `C`, `s`, `S` or `[`. For more information on the secure versions of the `scanf` family of functions, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md).
3938

4039
## See also
4140

42-
[scanf Width Specification](../c-runtime-library/scanf-width-specification.md)<br/>
43-
[scanf Type Field Characters](../c-runtime-library/scanf-type-field-characters.md)<br/>
44-
[scanf, _scanf_l, wscanf, _wscanf_l](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md)<br/>
45-
[scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
41+
[`scanf` Width Specification](../c-runtime-library/scanf-width-specification.md)\
42+
[`scanf` Type Field Characters](../c-runtime-library/scanf-type-field-characters.md)\
43+
[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md)\
44+
[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)

docs/c-runtime-library/reference/crtdumpmemoryleaks.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["CRTDBG_LEAK_CHECK_DF", "CRTDBG_CHECK_CRT_DF", "_CRTDBG_LEAK_CHECK_DF", "CrtDumpMemoryLeaks", "_CrtDumpMemoryLeaks", "_CRTDBG_CHECK_CRT_DF"]
1010
helpviewer_keywords: ["CrtDumpMemoryLeaks function", "CRTDBG_LEAK_CHECK_DF macro", "_CRTDBG_LEAK_CHECK_DF macro", "_CrtDumpMemoryLeaks function", "CRTDBG_CHECK_CRT_DF macro", "_CRTDBG_CHECK_CRT_DF macro"]
11-
ms.assetid: 71b2eab4-7f55-44e8-a55a-bfea4f32d34c
1211
---
13-
# _CrtDumpMemoryLeaks
12+
# `_CrtDumpMemoryLeaks`
1413

1514
Dumps all the memory blocks in the debug heap when a memory leak has occurred (debug version only).
1615

@@ -23,25 +22,25 @@ int _CrtDumpMemoryLeaks( void );
2322
2423
## Return Value
2524
26-
**_CrtDumpMemoryLeaks** returns TRUE if a memory leak is found. Otherwise, the function returns FALSE.
25+
**`_CrtDumpMemoryLeaks`** returns `TRUE` if a memory leak is found. Otherwise, the function returns `FALSE`.
2726
2827
## Remarks
2928
30-
The **_CrtDumpMemoryLeaks** function determines whether a memory leak has occurred since the start of program execution. When a leak is found, the debug header information for all the objects in the heap is dumped in a user-readable form. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, calls to **_CrtDumpMemoryLeaks** are removed during preprocessing.
29+
The **`_CrtDumpMemoryLeaks`** function determines whether a memory leak has occurred since the start of program execution. When a leak is found, the debug header information for all the objects in the heap is dumped in a user-readable form. When [`_DEBUG`](../../c-runtime-library/debug.md) isn't defined, calls to **`_CrtDumpMemoryLeaks`** are removed during preprocessing.
3130
32-
**_CrtDumpMemoryLeaks** is frequently called at the end of program execution to verify that all memory allocated by the application has been freed. The function can be called automatically at program termination by turning on the **_CRTDBG_LEAK_CHECK_DF** bit field of the [_crtDbgFlag](../../c-runtime-library/crtdbgflag.md) flag using the [_CrtSetDbgFlag](crtsetdbgflag.md) function.
31+
**`_CrtDumpMemoryLeaks`** is frequently called at the end of program execution to verify that all memory allocated by the application has been freed. The function can be called automatically at program termination by turning on the **`_CRTDBG_LEAK_CHECK_DF`** bit field of the [`_crtDbgFlag`](../../c-runtime-library/crtdbgflag.md) flag using the [`_CrtSetDbgFlag`](crtsetdbgflag.md) function.
3332
34-
**_CrtDumpMemoryLeaks** calls [_CrtMemCheckpoint](crtmemcheckpoint.md) to obtain the current state of the heap and then scans the state for blocks that have not been freed. When an unfreed block is encountered, **_CrtDumpMemoryLeaks** calls [_CrtMemDumpAllObjectsSince](crtmemdumpallobjectssince.md) to dump information for all the objects allocated in the heap from the start of program execution.
33+
**`_CrtDumpMemoryLeaks`** calls [`_CrtMemCheckpoint`](crtmemcheckpoint.md) to obtain the current state of the heap and then scans the state for blocks that haven't been freed. When an unfreed block is encountered, **`_CrtDumpMemoryLeaks`** calls [`_CrtMemDumpAllObjectsSince`](crtmemdumpallobjectssince.md) to dump information for all the objects allocated in the heap from the start of program execution.
3534
36-
By default, internal C run-time blocks (**_CRT_BLOCK**) are not included in memory dump operations. The [_CrtSetDbgFlag](crtsetdbgflag.md) function can be used to turn on the **_CRTDBG_CHECK_CRT_DF** bit of **_crtDbgFlag** to include these blocks in the leak detection process.
35+
By default, internal C run-time blocks (**`_CRT_BLOCK`**) aren't included in memory dump operations. The [`_CrtSetDbgFlag`](crtsetdbgflag.md) function can be used to turn on the **`_CRTDBG_CHECK_CRT_DF`** bit of **`_crtDbgFlag`** to include these blocks in the leak detection process.
3736
38-
For more information about heap state functions and the **_CrtMemState** structure, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details).
37+
For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details).
3938
4039
## Requirements
4140
4241
|Routine|Required header|
4342
|-------------|---------------------|
44-
|**_CrtDumpMemoryLeaks**|\<crtdbg.h>|
43+
|**`_CrtDumpMemoryLeaks`**|`<crtdbg.h>`|
4544
4645
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
4746
@@ -51,8 +50,8 @@ Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-fea
5150
5251
## Example
5352
54-
For a sample of how to use **_CrtDumpMemoryLeaks**, see [crt_dbg1](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg1).
53+
For a sample of how to use **`_CrtDumpMemoryLeaks`**, see [`crt_dbg1`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg1).
5554
5655
## See also
5756
58-
[Debug Routines](../../c-runtime-library/debug-routines.md)<br/>
57+
[Debug Routines](../../c-runtime-library/debug-routines.md)

docs/c-runtime-library/reference/fflush.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["fflush"]
1010
helpviewer_keywords: ["streams, flushing", "flushing", "fflush function"]
11-
ms.assetid: 8bbc753f-dc74-4e77-b563-74da2835e92b
1211
---
13-
# fflush
12+
# `fflush`
1413

1514
Flushes a stream.
1615

@@ -24,35 +23,35 @@ int fflush(
2423

2524
### Parameters
2625

27-
*stream*<br/>
28-
Pointer to **FILE** structure.
26+
*`stream`*\
27+
Pointer to **`FILE`** structure.
2928

3029
## Return Value
3130

32-
**fflush** returns 0 if the buffer was successfully flushed. The value 0 is also returned in cases in which the specified stream has no buffer or is open for reading only. A return value of **EOF** indicates an error.
31+
**`fflush`** returns 0 if the buffer was successfully flushed. The value 0 is also returned in cases in which the specified stream has no buffer or is open for reading only. A return value of **`EOF`** indicates an error.
3332

3433
> [!NOTE]
35-
> If **fflush** returns **EOF**, data may have been lost due to a write failure. When setting up a critical error handler, it is safest to turn buffering off with the **setvbuf** function or to use low-level I/O routines such as **_open**, **_close**, and **_write** instead of the stream I/O functions.
34+
> If **`fflush`** returns **`EOF`**, data may have been lost due to a write failure. When setting up a critical error handler, it is safest to turn buffering off with the **`setvbuf`** function or to use low-level I/O routines such as **`_open`**, **`_close`**, and **`_write`** instead of the stream I/O functions.
3635
3736
## Remarks
3837

39-
The **fflush** function flushes the stream *stream*. If the stream was opened in write mode, or it was opened in update mode and the last operation was a write, the contents of the stream buffer are written to the underlying file or device and the buffer is discarded. If the stream was opened in read mode, or if the stream has no buffer, the call to **fflush** has no effect, and any buffer is retained. A call to **fflush** negates the effect of any prior call to **ungetc** for the stream. The stream remains open after the call.
38+
The **`fflush`** function flushes the stream *`stream`*. If the stream was opened in write mode, or it was opened in update mode and the last operation was a write, the contents of the stream buffer are written to the underlying file or device and the buffer is discarded. If the stream was opened in read mode, or if the stream has no buffer, the call to **`fflush`** has no effect, and any buffer is retained. A call to **`fflush`** negates the effect of any prior call to **`ungetc`** for the stream. The stream remains open after the call.
4039

41-
If *stream* is **NULL**, the behavior is the same as a call to **fflush** on each open stream. All streams opened in write mode and all streams opened in update mode where the last operation was a write are flushed. The call has no effect on other streams.
40+
If *`stream`* is **`NULL`**, the behavior is the same as a call to **`fflush`** on each open stream. All streams opened in write mode and all streams opened in update mode where the last operation was a write are flushed. The call has no effect on other streams.
4241

43-
Buffers are normally maintained by the operating system, which determines the optimal time to write the data automatically to disk: when a buffer is full, when a stream is closed, or when a program terminates normally without closing the stream. The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating-system buffers. Without rewriting an existing program, you can enable this feature by linking the program's object files with COMMODE.OBJ. In the resulting executable file, calls to **_flushall** write the contents of all buffers to disk. Only **_flushall** and **fflush** are affected by COMMODE.OBJ.
42+
Buffers are normally maintained by the operating system, which determines the optimal time to write the data automatically to disk: when a buffer is full, when a stream is closed, or when a program terminates normally without closing the stream. The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating-system buffers. Without rewriting an existing program, you can enable this feature by linking the program's object files with `COMMODE.OBJ`. In the resulting executable file, calls to **`_flushall`** write the contents of all buffers to disk. Only **`_flushall`** and **`fflush`** are affected by `COMMODE.OBJ`.
4443

45-
For information about controlling the commit-to-disk feature, see [Stream I/O](../../c-runtime-library/stream-i-o.md), [fopen](fopen-wfopen.md), and [_fdopen](fdopen-wfdopen.md).
44+
For information about controlling the commit-to-disk feature, see [Stream I/O](../../c-runtime-library/stream-i-o.md), [`fopen`](fopen-wfopen.md), and [`_fdopen`](fdopen-wfdopen.md).
4645

47-
This function locks the calling thread and is therefore thread-safe. For a non-locking version, see **_fflush_nolock**.
46+
This function locks the calling thread and is therefore thread-safe. For a non-locking version, see **`_fflush_nolock`**.
4847

4948
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
5049

5150
## Requirements
5251

5352
|Function|Required header|
5453
|--------------|---------------------|
55-
|**fflush**|\<stdio.h>|
54+
|**`fflush`**|`<stdio.h>`|
5655

5756
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
5857

@@ -108,7 +107,7 @@ User selected 5
108107

109108
## See also
110109

111-
[Stream I/O](../../c-runtime-library/stream-i-o.md)<br/>
112-
[fclose, _fcloseall](fclose-fcloseall.md)<br/>
113-
[_flushall](flushall.md)<br/>
114-
[setvbuf](setvbuf.md)<br/>
110+
[Stream I/O](../../c-runtime-library/stream-i-o.md)\
111+
[`fclose`, `_fcloseall`](fclose-fcloseall.md)\
112+
[`_flushall`](flushall.md)\
113+
[`setvbuf`](setvbuf.md)

docs/c-runtime-library/reference/getch.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["getch"]
1010
helpviewer_keywords: ["getch function"]
11-
ms.assetid: d3a0b744-d63c-4f71-960e-24e619dccd01
1211
---
1312
# getch
1413

15-
The Microsoft-specific function name `getch` is a deprecated alias for the [_getch](getch-getwch.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported.
14+
The Microsoft-specific function name `getch` is a deprecated alias for the [`_getch`](getch-getwch.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported.
1615

17-
We recommend you use [_getch](getch-getwch.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names).
16+
We recommend you use [`_getch`](getch-getwch.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names).
1817

1918
> [!IMPORTANT]
2019
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).

0 commit comments

Comments
 (0)