Author: sebor
Date: Fri Jun 22 22:48:24 2007
New Revision: 550011

URL: http://svn.apache.org/viewvc?view=rev&rev=550011
Log:
2007-06-22  Martin Sebor  <[EMAIL PROTECTED]>

        * 30-3.html: Added a note about the effects of ios::out creating
        a file when it doesn't exist.

Modified:
    incubator/stdcxx/trunk/doc/stdlibug/30-3.html

Modified: incubator/stdcxx/trunk/doc/stdlibug/30-3.html
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/doc/stdlibug/30-3.html?view=diff&rev=550011&r1=550010&r2=550011
==============================================================================
--- incubator/stdcxx/trunk/doc/stdlibug/30-3.html (original)
+++ incubator/stdcxx/trunk/doc/stdlibug/30-3.html Fri Jun 22 22:48:24 2007
@@ -9,10 +9,12 @@
 <P>There may be times when you want to modify the way a file is opened or used 
in a program. For example, in some cases it is desirable that writes append to 
the end of a file rather than overwriting the existing values. The file stream 
constructor takes a second argument, the <I>open mode</I>, that allows such 
variations to be specified. Here is an example that creates a file stream 
object <SAMP>Str</SAMP>, connects it to the external file named 
<SAMP>"inout.txt"</SAMP>, and opens it for reading and for writing at the end 
of the file:</P>
 
 <UL><PRE>
-std::fstream Str("inout.txt",
-                 std::ios_base::in | std::ios_base::out |
-                 std::ios_base::app);
+std::fstream Str("inout.txt", std::ios_base::in | std::ios_base::out | 
std::ios_base::app);
 </PRE></UL>
+<P>
+Note that if the <SAMP>"inout.txt"</SAMP> file doesn't exist it will be
+created.
+</P>
 <A NAME="3031"><H3>30.3.1 The Open Mode Flags</H3></A>
 <A NAME="idx751"><!></A>
 <P>The open mode argument is of type <SAMP>std::ios_base::openmode</SAMP>, 
which is a bitmask type like the format flags and the stream state. <A 
HREF="30-3.html#Table&nbsp;32">Table&nbsp;32</A> defines the following bits:</P>


Reply via email to