Week 6

Home Windows C++ 241 C++ 242 Contact Info Contents

Week 6 - February 5/7

Back Up Next

Due This Week

Program #5 due on Monday February 5.

Preparation for Class

Review variable scope in conjunction with program 5.
Read chapter 5 of the text.

Topics Covered this Week

Review of Program 5
Structures (lecture)
Review of data types 
Why we need structures
Declaring a structure
Referencing structure members
Comparison to other languages
Classes (lecture)
Why we need classes
Classes versus structures
Member variables and functions
Declaring an object of a class
Referencing member variables`
invoking member functions
String Variables (lecture)
String data types in other languages
The string standard library class
Using string objects
Introduction to Input and Output
Formatted versus binary I/O
Console versus file I/O
Streams versus function-based I/O
Steps of using a file or stream
Benefits of stream objects
File I/O
Opening a file
Reading from a file
Writing to a file
Closing a file
Tools for Stream I/O
Formatting functions
Manipulators
Namespaces ( a necessary digression )
File names as input
File names as command line arguments
Character I/O
Doing I/O one character at a time
Putting back characters
Testing for end of file
Predefined character functions
Reading one line at a time
Checking for error in user input

Assignments

Program #6

Back Up Next

Home Windows C++ 241 C++ 242 Contact Info Contents

Copyright © 2000  Charlie Poole. All rights reserved.
Revised: July 15, 2002 - cpoole@ctc.edu