Skip to content

Commit 07f5e43

Browse files
TaojunshenColin RobertsonTylerMSFTopbld15TylerMSFT
authored
8/31/2021 AM Publish (#3746)
* draft * fix code sample (#3676) * fix code sample * acrolinx Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * document clocks * add tai-clock * Address 3269 typo in warning number (#3680) * Fixed typo: evalution --> evaluation * updates * finish draft of new clocks * acrolinx * Fixed typo: evalution --> evaluation * Bulk Fix - Sentence form for all alt text (#3683) * Updated C/C++ workload name The workload for C/C++ development in VS Build Tools 2019 installer is called 'Desktop development with C++'. * Split out docs by version Add VS2017-specific instructions. * Updated C/C++ workload name The workload for C/C++ development in VS Build Tools 2019 installer is called 'Desktop development with C++'. * Split out docs by version Add VS2017-specific instructions. * Add 16.11 Compiler Warnings C5247 and C5248 (MicrosoftDocs#3689) * Add C5247 and C5248 * Fix link typos * Updates per Xiang Fan review * More wordsmithage * More fix per X.F. * Fix inconsistencies in CMake docs (MicrosoftDocs#3692) * Standard format for CMake docs * Fix markdownlint * More cleanup. * Clean up link issue, acrolinx * Fix more broken things * Undo a change * Add documentation for "unspecified" architecture Add documentation regarding "unspecified" architecture such that it provides an option for someone to ensure that no inherited environment is selected. * Update markdownlint.json file for unordered lists (#3694) Block rule that wants * instead of - to prefix unordered lists, since we've standardized on the latter. Merging on my own recognizance as repo admin. * Clean up documentation for "unspecified" architecture * Markdown quality fixes 1 of N * Markdown quality fixes 2 of N * Markdown quality fixes 3 of N * Markdown quality fixes 4 of N * Markdown quality fixes 5 of N * Markdown quality fixes 6 of N * Markdown quality fixes 7 of N * Markdown quality fixes 8 of N * Markdown quality fixes 9 of N * Markdown quality fixes 10 of N * Undo TN038 * Markdown quality fixes 11 of N * Setting PATH allows DUMPBIN to be executed from the system command prompt. There are multiple DUMPBIN.EXE's in the MSVC folder, but they can be executed if the PATH is set correctly. If this is not true, or undesireable per system design constraints, please clarify otherwise. * Call out toolchains and embedded scenarios * Add link to environment setting instructions * Make more readable * Address cpp-docs 3286 Postfix increment, decrement syntax (MicrosoftDocs#3711) * Address cpp-docs issue 3286 * Fix formatting, final example * Add compiler warning C5243, C5249, C5250 (MicrosoftDocs#3710) * Removing linux and non-windows bullet point * Make clear it's not required to meet all conditions Add "or" to final bullet point * PR review edit, Microsoft style for lists * Make the "unspecified" architecture option more general * Add __SANITIZE_ADDRESS__ to predefined macros page Noticed __SANITIZE_ADDRESS__ was missing from this list. * Add VS version Also note the VS version where __SANITIZE_ADDRESS__ was added in. * Add docs on using existing cache without cmake-server * Fix unescaped <chrono> (MicrosoftDocs#3715) Noticed this while doing other changes. Without being in a code block, <chrono> becomes the html element of the same name. * Address issue 3301 * Create and integrate /Zc:lambda article (#3719) * Create and integrate /Zc:lambda article * Fix conformance topic date * First half of C++20 changes * The other half of the /std:c++20 fixes * Fix link * Update cmake-projects-in-visual-studio.md * Remove duplicate line in build TOC * tech review * fixes * Cleanup per review * Update thread-class.md * Update future-functions.md * Update execution.md * Update execution.md * Update execution.md * Update future-functions.md * Update thread-class.md * Update execution.md * Update future-functions.md * Update thread-class.md * updates per tech review and other * added file_clock * Update execution.md * Update future-functions.md * Update thread-class.md * add gps_clock * update metadata * PR review edit, relative links * PR review edit, relative links * PR review edit, relative link * Fixed typo in bit-functions.md * Further typo fix * finished draft for local_t * acrolinx * Fixed broken links * incorp tech review * update typedef sections * add all related typedefs * fix tables * acrolinx * cleanup * fix links * fix tables * more table cleanup * another fix for tables. error msgs aren't by the error but I think I finally found the issue * one more table fix * typos * typo in code example * Update links to ARM docs (#3735) * Update links to ARM docs * Acrolinx and formatting pass * Acrolinx * Fix locale_t -> _locale_t * Update output-file-stream-member-functions.md Updated some code escapes for localization * Address github issues (MicrosoftDocs#3737) * fix github 3268 code example for Context::Yield() * fixed github #3312 - MFC CWnd::OnMouseHWheel description * Fix for github #3259-clarify change in the UI * acrolinx Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Update how-to-convert-standard-string-to-system-string.md Fixing example. ------- cc: @TylerMSFT GitHub Issue: https://github.com/MicrosoftDocs/cpp-docs/issues/2438 * PR review edit, date * Typo: B::f instead of B::F Co-authored-by: Colin Robertson <corob@microsoft.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: ystamant <49958001+ystamant@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: Andrew Shymanel <88244804+ainrd@users.noreply.github.com> Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com> Co-authored-by: PRMerger6 <prmrgr6@microsoft.com> Co-authored-by: PRMerger12 <prmrgr12@microsoft.com> Co-authored-by: PRMerger14 <prmrgr14@microsoft.com> Co-authored-by: PRMerger16 <prmrgr16@microsoft.com> Co-authored-by: PRMerger15 <prmrgr15@microsoft.com> Co-authored-by: PRMerger7 <prmrgr7@microsoft.com> Co-authored-by: PRMerger10 <prmrgr10@microsoft.com> Co-authored-by: David Dyck <david.dyck@gmail.com> Co-authored-by: Kristine Toliver <ktoliver@users.noreply.github.com> Co-authored-by: Steve Wishnousky <stwish@microsoft.com> Co-authored-by: Sam Freed <sfreed141@gmail.com> Co-authored-by: Don Spencer <87099566+v-donspencer@users.noreply.github.com> Co-authored-by: Beau Braig <86677107+BeauBraig@users.noreply.github.com> Co-authored-by: Alex Guteniev <gutenev@gmail.com> Co-authored-by: Paula Miller <v-paulmi@microsoft.com> Co-authored-by: RibShark <1957489+RibShark@users.noreply.github.com> Co-authored-by: onihusube <44743040+onihusube@users.noreply.github.com> Co-authored-by: PRMerger8 <prmrgr8@microsoft.com> Co-authored-by: Chris Ho <sudoerchris.ho@pm.me> Co-authored-by: Andrew Rogers <andrew.rogers@wdc.com> Co-authored-by: Sauparna Palchowdhury <91951+sauparna@users.noreply.github.com>
1 parent b950d07 commit 07f5e43

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct B : public A {
4646
int main() {
4747
B b;
4848
int i = 1;
49-
b.f(i); // B::F hides A::f Uncomment the using declaration in B.
49+
b.f(i); // B::f hides A::f Uncomment the using declaration in B.
5050
}
5151
```
5252

docs/standard-library/output-file-stream-member-functions.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
---
22
description: "Learn more about: Output File Stream Member Functions"
33
title: "Output File Stream Member Functions"
4-
ms.date: "11/04/2016"
4+
ms.date: "08/25/2021"
55
helpviewer_keywords: ["output streams [C++], member functions"]
6-
ms.assetid: 38aaf710-8035-4a34-a0c4-123a5327f28a
76
---
87
# Output File Stream Member Functions
98

109
Output stream member functions have three types: those that are equivalent to manipulators, those that perform unformatted write operations, and those that otherwise modify the stream state and have no equivalent manipulator or insertion operator. For sequential, formatted output, you might use only insertion operators and manipulators. For random-access binary disk output, you use other member functions, with or without insertion operators.
1110

1211
## The open Function for Output Streams
1312

14-
To use an output file stream ([ofstream](../standard-library/basic-ofstream-class.md)), you must associate that stream with a specific disk file in the constructor or the `open` function. If you use the `open` function, you can reuse the same stream object with a series of files. In either case, the arguments describing the file are the same.
13+
To use an output file stream ([`ofstream`](../standard-library/basic-ofstream-class.md)), you must associate that stream with a specific disk file in the constructor or the `open` function. If you use the `open` function, you can reuse the same stream object with a series of files. In either case, the arguments describing the file are the same.
1514

16-
When you open the file associated with an output stream, you generally specify an `open_mode` flag. You can combine these flags, which are defined as enumerators in the `ios` class, with the bitwise OR ( &#124; ) operator. See [ios_base::openmode](../standard-library/ios-base-class.md#openmode) for a list of the enumerators.
15+
When you open the file associated with an output stream, you generally specify an `open_mode` flag. You can combine these flags, which are defined as enumerators in the `ios` class, with the bitwise OR ( `|` ) operator. See [`ios_base::openmode`](../standard-library/ios-base-class.md#openmode) for a list of the enumerators.
1716

1817
Three common output stream situations involve mode options:
1918

2019
- Creating a file. If the file already exists, the old version is deleted.
2120

2221
```cpp
23-
ostream ofile("FILENAME");
22+
ofstream ofile("FILENAME");
2423
// Default is ios::out
2524

2625
ofstream ofile("FILENAME", ios::out);
@@ -46,9 +45,9 @@ Three common output stream situations involve mode options:
4645
// When ofile goes out of scope it is destroyed.
4746
```
4847

49-
## The put
48+
## The `put` function
5049

51-
The **put** function writes one character to the output stream. The following two statements are the same by default, but the second is affected by the stream's format arguments:
50+
The `put` function writes one character to the output stream. The following two statements are the same by default, but the second is affected by the stream's format arguments:
5251

5352
```cpp
5453
cout.put('A');
@@ -57,7 +56,7 @@ cout.put('A');
5756
cout <<'A'; // Format arguments 'width' and 'fill' apply
5857
```
5958

60-
## The write
59+
## The `write` function
6160

6261
The `write` function writes a block of memory to an output file stream. The length argument specifies the number of bytes written. This example creates an output file stream and writes the binary value of the `Date` structure to it:
6362

@@ -80,7 +79,7 @@ int main( )
8079
}
8180
```
8281
83-
The `write` function does not stop when it reaches a null character, so the complete class structure is written. The function takes two arguments: a **`char`** pointer and a count of characters to write. Note the required cast to **`char`**<strong>\*</strong> before the address of the structure object.
82+
The `write` function does not stop when it reaches a null character, so the complete class structure is written. The function takes two arguments: a **`char`** pointer and a count of characters to write. Note the required cast to **`char *`** before the address of the structure object.
8483
8584
## The seekp and tellp Functions
8685
@@ -98,12 +97,12 @@ Use these member functions to test for errors while writing to a stream:
9897
9998
|Function|Return value|
10099
|--------------|------------------|
101-
|[bad](basic-ios-class.md#bad)|Returns **`true`** if there is an unrecoverable error.|
102-
|[fail](basic-ios-class.md#fail)|Returns **`true`** if there is an unrecoverable error or an "expected" condition, such as a conversion error, or if the file is not found. Processing can often resume after a call to `clear` with a zero argument.|
103-
|[good](basic-ios-class.md#good)|Returns **`true`** if there is no error condition (unrecoverable or otherwise) and the end-of-file flag is not set.|
104-
|[eof](basic-ios-class.md#eof)|Returns **`true`** on the end-of-file condition.|
105-
|[clear](basic-ios-class.md#clear)|Sets the internal error state. If called with the default arguments, it clears all error bits.|
106-
|[rdstate](basic-ios-class.md#rdstate|Returns the current error state.|
100+
|[`bad`](basic-ios-class.md#bad)|Returns **`true`** if there is an unrecoverable error.|
101+
|[`fail`](basic-ios-class.md#fail)|Returns **`true`** if there is an unrecoverable error or an "expected" condition, such as a conversion error, or if the file is not found. Processing can often resume after a call to `clear` with a zero argument.|
102+
|[`good`](basic-ios-class.md#good)|Returns **`true`** if there is no error condition (unrecoverable or otherwise) and the end-of-file flag is not set.|
103+
|[`eof`](basic-ios-class.md#eof)|Returns **`true`** on the end-of-file condition.|
104+
|[`clear`](basic-ios-class.md#clear)|Sets the internal error state. If called with the default arguments, it clears all error bits.|
105+
|[`rdstate`](basic-ios-class.md#rdstate|Returns the current error state.|
107106
108107
The **!** operator is overloaded to perform the same function as the `fail` function. Thus the expression:
109108
@@ -117,7 +116,7 @@ is equivalent to:
117116
if(cout.fail())...
118117
```
119118

120-
The **void\*()** operator is overloaded to be the opposite of the **!** operator; thus the expression:
119+
The **`void*()`** operator is overloaded to be the opposite of the **`!`** operator; thus the expression:
121120

122121
```cpp
123122
if(cout)...
@@ -129,7 +128,7 @@ is equal to:
129128
if(!cout.fail())...
130129
```
131130

132-
The **void\*()** operator is not equivalent to `good` because it does not test for the end of file.
131+
The **`void*()`** operator is not equivalent to `good` because it does not test for the end of file.
133132

134133
## See also
135134

0 commit comments

Comments
 (0)