-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
300 lines (221 loc) · 8.94 KB
/
index.html
File metadata and controls
300 lines (221 loc) · 8.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!-- Mirrored from cppreference.com/cppio/index.html by HTTrack Website Copier/3.x [XR&CO'2004], Tue, 22 Jan 2008 06:22:13 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=iso-8859-1"><!-- /Added by HTTrack -->
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org">
<title>C++ I/O</title>
<link href="../cppreference.css" rel="stylesheet" type="text/css">
<link href="../prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../prettify.js"></script>
</head>
<body onload="prettyPrint()">
<table>
<tr>
<td>
<div class="body-content">
<div class="header-box">
<a href="../index-2.html">cppreference.com</a> > <a href=
"index.html">C++ I/O</a>
</div>
<div class="name-format">
C++ I/O
</div>
<p>The <iostream> library automatically defines a few standard
objects:</p>
<ul>
<li>cout, an object of the ostream class, which displays data to
the standard output device.</li>
<li>cerr, another object of the ostream class that writes
unbuffered output to the standard error device.</li>
<li>clog, like cerr, but uses buffered output.</li>
<li>cin, an object of the istream class that reads data from the
standard input device.</li>
</ul>
<p>The <fstream> library allows programmers to do file input
and output with the ifstream and ofstream classes.</p>
<p>C++ programmers can also do input and output from strings by
using the <a
href="http://www.cppreference.com/cppsstream/index.html">String
Stream</a> class.</p>
<p>Some of the behavior of the C++ I/O streams (precision,
justification, etc) may be modified by manipulating various <a href=
"../io_flags.html#format_flags">io stream format flags</a>.</p>
<p>Here are <a href="examples.html">some examples of what you can do
with C++ I/O</a>.</p>
<p><a href="all.html">Display all entries</a> for C++ I/O on one
page, or view entries individually:</p>
<table class="category-table">
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="constructors.html">I/O
Constructors</a></td>
<td class="category-table-td">constructors</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="bad.html">bad</a></td>
<td class="category-table-td">true if an error occurred</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="clear.html">clear</a></td>
<td class="category-table-td">clear and set status flags</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="close.html">close</a></td>
<td class="category-table-td">close a stream</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="eof.html">eof</a></td>
<td class="category-table-td">true if at the end-of-file</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="fail.html">fail</a></td>
<td class="category-table-td">true if an error occurred</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="fill.html">fill</a></td>
<td class="category-table-td">manipulate the default fill
character</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="flags.html">flags</a></td>
<td class="category-table-td">access or manipulate <a href=
"../io_flags.html#format_flags">io stream format flags</a></td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="flush.html">flush</a></td>
<td class="category-table-td">empty the buffer</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href=
"gcount.html">gcount</a></td>
<td class="category-table-td">number of characters read during
last input</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="get.html">get</a></td>
<td class="category-table-td">read characters</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href=
"getline.html">getline</a></td>
<td class="category-table-td">read a line of characters</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="good.html">good</a></td>
<td class="category-table-td">true if no errors have
occurred</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href=
"ignore.html">ignore</a></td>
<td class="category-table-td">read and discard characters</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="open.html">open</a></td>
<td class="category-table-td">open a new stream</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="peek.html">peek</a></td>
<td class="category-table-td">check the next input character</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href=
"precision.html">precision</a></td>
<td class="category-table-td">manipulate the precision of a
stream</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="put.html">put</a></td>
<td class="category-table-td">write characters</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href=
"putback.html">putback</a></td>
<td class="category-table-td">return characters to a stream</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href=
"rdstate.html">rdstate</a></td>
<td class="category-table-td">returns the state flags of the
stream</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="read.html">read</a></td>
<td class="category-table-td">read data into a buffer</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="seekg.html">seekg</a></td>
<td class="category-table-td">perform random access on an input
stream</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="seekp.html">seekp</a></td>
<td class="category-table-td">perform random access on output
streams</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="setf.html">setf</a></td>
<td class="category-table-td">set format flags</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href=
"sync_with_stdio.html">sync_with_stdio</a></td>
<td class="category-table-td">synchronize with standard I/O</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="tellg.html">tellg</a></td>
<td class="category-table-td">read input stream pointers</td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="tellp.html">tellp</a></td>
<td class="category-table-td">read output stream pointers</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href=
"unsetf.html">unsetf</a></td>
<td class="category-table-td">clear <a href=
"../io_flags.html#format_flags">io stream format flags</a></td>
</tr>
<tr class="category-table-tr-2">
<td class="category-table-td"><a href="width.html">width</a></td>
<td class="category-table-td">access and manipulate the minimum
field width</td>
</tr>
<tr class="category-table-tr-1">
<td class="category-table-td"><a href="write.html">write</a></td>
<td class="category-table-td">write characters</td>
</tr>
</table>
</div>
</td>
<td width="120" valign="top">
<script type="text/javascript"><!--
google_ad_client = "pub-6243170425937584";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "EEEEFF";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "336699.html";
google_color_text = "333333";
//--></script>
<script type="text/javascript"
src="../../pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<script src="../../www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2828341-1";
urchinTracker();
</script>
</tr>
</table>
</body>
<!-- Mirrored from cppreference.com/cppio/index.html by HTTrack Website Copier/3.x [XR&CO'2004], Tue, 22 Jan 2008 06:22:14 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=iso-8859-1"><!-- /Added by HTTrack -->
</html>