(Click here for a personal note from Marshall Cline.)
C++ FAQ
/
Section 15
/ FAQ 15.14
Section 15:
15.1
Advantages of
<iostream>
over
<cstdio>
?
15.2
Understanding infinite loop when the input is invalid?
15.3
How can I get
std::cin
to skip invalid input characters?
15.4
How does that funky
while (std::cin >> foo)
syntax work?
15.5
Why does my input seem to process past the end of file?
15.6
Why is my program ignoring my input request after the first iteration?
15.7
Should I end my output lines with
std::endl
or
'\n'
?
15.8
How can I provide printing for my
class
Fred
?
15.9
Using a
printOn()
method vs. a
friend
function?
15.10
How can I provide input for my
class
Fred
?
15.11
Providing printing for an entire hierarchy of classes?
15.12
How can I open a stream in binary mode?
15.13
"Reopening"
std::cin
and
std::cout
in binary mode?
15.14
How can I write/read objects of my class to/from a data file?
15.15
Sending objects over a network?
15.16
Backslashes in filenames?
15.17
How to capture key presses before the ENTER key?
15.18
How to turn off screen echo on keyboard input?
15.19
How can I move the cursor around on the screen?
15.20
How can I clear the screen?
15.21
How can I change the colors on the screen?
15.22
How can I print the numeric value of a
char
or
char*
?
Updated!
[15.14] How can I write/read objects of my class to/from a data file?
Read the section on
object serialization
.