CPS 6L.2 Ramm - Fall 2001 - 9/28/01 #15
- Announce
- Quiz Today
- Hour Test Next Wednesday
- Review Monday (bring questions!)
- UTA Consultant Schedule on Line
6. Classes, Iterators, & Patterns
- UNIX File Streams
stdin, stdout
- Redirection
-
program < infilename
-
program > outfilename
-
program < infilename > outfilename
- Pipes
-
program1 | program2
-
program1 | program2 | program3
- Filters
- Extrema, Statistics
- Type Casting (coercion)
- Change one type to another
- Only defined where it makes sense
- Several different forms exist
- E.g., changing int to double
- double(n)
- (double) n
- Using Reference Parameters
-
stats3.cpp
-
stats4.cpp
- Iteration: Counting Words Using WordStreamIterator Class
wordstit.cpp
worditer.h
- Text Processing Example
- Design Issues
- Moving Functionality to Functions
- Use of Reference Parameters
-
format.cpp
-
formatwatch.cpp
- More Reference Parameters (tricky)
-
ref.cpp