Class Notes (998,502)
US (389,453)
U of M (6,545)
ENGR (63)
ENGR 101 (52)
Lecture 10

ENGR 101 Lecture 10: Streams and IO

2 Pages
51 Views
Fall 2017

Department
Engineering
Course Code
ENGR 101
Professor
Jeffrey Ringenberg
Lecture
10

This preview shows half of the first page. Sign up to view the full 2 pages of the document.
!"#$%&'"&(()"*+,"-'"./'0"1("2')'+1'0&3"+/4"1$'"./'2"5(2"%,).1".,1%&"%1"/+1%/5%'/"
/(6'"*2%1'2%+7"
-
!"&(()"*+,"-'"./'0"1("*(&&'*1"%,).1".,1%&"1$'"./'2"',1'2/"+"/)'*%+&"8+&.'9"*+&&'0"+"
/',1%,'&7"
-
:%,"%/"+,"%/12'+6"(-;'*1"<+/"#'&&"+/"%5/12'+6="
-
:(.1"%/"+,"(/12'+6"(-;'*1"<+/"#'&&"+/"(5/12'+6=
-
>12'+6/"%,"?','2+&"
@AB"5%&',+6'71A19"0+1+7%,9"/'28'2C'22(2/7&(D
-
F1"%/"'+/%'2"1("#(24"#%1$"5%&'/"1$+1"+2'"%,"1$'"/+6'"0%2'*1(23"#$'2'"3(."2.,"1$'"
)2(D2+67"
G%,*&.0'"H5/12'+6I"
J("./'9"#'",''0"1$'"5/12'+6"&%-2+23"
-
!00"./%,D",+6'/)+*'"/10
-
K%&'"/12'+6"
L5/12'+6"5(.1<MD2''17(.1M=N"
J("#2%1'"(.1).1"1("+"5%&'9"3(."./'"+,"(5/12'+6"(-;'*1"
-
F5"1$'"5%&'"0('/,O1"'A%/19"%1"#%&&"-'"*2'+1'0N"
-
F5"1$'"5%&'"+&2'+03"'A%/1/9"%1"#%&&"-'"(8'2#2%11',7"
-
J$',"#2%1'"1("1$'"5%&'"./%,D""M5(.1M
-
K(.17*&(/'<=N"
P'6'6-'2"1("*&(/'"1$'"5%&'"(,*'"3(."+2'"0(,'"./%,D"%1B
-
:2'+1'/"+,"%5/12'+6"(-;'*1",+6'0"5%,"
Q%&&"2'+0"+,"%,).1"2(6"+"5%&'",+6'/"M#(20/7%,M
F5/12'+6"5%,<M#(20/7%,M=N"
-
>(6'1%6'/"1$'")2(D2+6"%/".,+-&'"1("()',"+"5%&'"5(2"%,).1"-'*+./'"%1"0('/,R1"
'A%/1"(2"+"0%55'2',1")2(D2+6"6+3"-'"./%,D"%1"
-
K%,"%/"1$'"%5/12'+6"(-;'*1"
:$'*4"#$'1$'2"1$'"5%&'"()','0"/.**'//5.&&3"./%,D"5%,7%/C()',<=
-
@+*$")%'*'" (5"%,).1"2'+0"-3"'A12+*1%(,"II"%/"0'&%6%1'0"-3"#$%1'/)+*'"<#$%*$"
%,*&.0'/"/)+*'/9"1+-/"+,0",'#&%,'/
-
Q$%1'/)+*'
Streams(and(I/O
Q'0,'/0+39" S(8'6-'2" T9"UVWX
WVBUY"!Z

Loved by over 2.2 million students

Over 90% improved by at least one letter grade.

Leah — University of Toronto

OneClass has been such a huge help in my studies at UofT especially since I am a transfer student. OneClass is the study buddy I never had before and definitely gives me the extra push to get from a B to an A!

Leah — University of Toronto
Saarim — University of Michigan

Balancing social life With academics can be difficult, that is why I'm so glad that OneClass is out there where I can find the top notes for all of my classes. Now I can be the all-star student I want to be.

Saarim — University of Michigan
Jenna — University of Wisconsin

As a college student living on a college budget, I love how easy it is to earn gift cards just by submitting my notes.

Jenna — University of Wisconsin
Anne — University of California

OneClass has allowed me to catch up with my most difficult course! #lifesaver

Anne — University of California
Description
Streams and IO Wednesday, November 8, 2017 10:29 AM A while loop can be used to repeatedly ask the user for input until it satisfies some criteria. A loop can be used to collect input until the user enters a special value, called a sentinel. Streams in General Cin is an istream object (as well as ifstream) Cout is an ostream object (as well as ofstream) It is easier to work with files that are in the same directory where you run the program. Just provide the name of the file. Ex: filename.txt, data.in, server_errors.log File stream To use, we need the fstream library include Add using namespace std To write output to a file, you use an ofstream object
More Less
Unlock Document
Start your 2 week free trial

Only half of the first page are available for preview. Some parts have been intentionally blurred.

Unlock Document
Start your 2 week free trial
You're Reading a Preview

Unlock to view full version

Unlock Document
Start your 2 week free trial

Share with your friends

Get 2 friends to sign-up for a free trial as well, and get an additional free week

Next

You've reached the limit of 4 previews this month

Create an account for unlimited previews.

Already have an account?

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit