{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

llapioNoteSet05

llapioNoteSet05 - Principles of Programming I Note Set#5 1...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Principles of Programming I Note Set #5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Hw 2 What am I looking for: Check for valid values (non-negative) Using static variables correctly Displaying the correct value for 0
Background image of page 2
3 Let’s Review First Inline functions Overloaded functions http://www-ccs.ucsd.edu/c/math.html Exit Stubs Previous Weeks: Pass by Value vs Pass by Reference Returning values from functions
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Semester Overview Functions Character File I/O Arrays Pointers and Dynamic Memory Allocation Structures/Records Binary File I/O
Background image of page 4
5 TODAY: Mechanics of character-based file Input/Output Reading from File Writing to File
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 3 Steps to Using a File in your Programs Open the file for reading or writing (or both) Read from or write to the file Close the file
Background image of page 6
7 Writing 10 A 25 \n 10 25 A \n Memory File From variables to the file
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 Reading 10 A 25 \n 10 25 A \n Memory File From the file into variables
Background image of page 8
9 File Streams ofstream Data type that can be used to create files and/or write information to them. Output File Stream memory file
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10 File Streams ifstream Data type that can be used to read information from files into memory Input File Stream memory file
Background image of page 10
11 File Streams fstream
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}