Input/Output in C++

3/5/99


Click here to start


Table of Contents

Input/Output in C++

Outline

Using iostream.h

The Insertion Operator (<<)

The Extraction Operator (>>)

Chaining Calls

Setting Format Flags

Setting Format Flags (cont)

Integer Base and Format Flags

Integer Base and Format Flags (cont)

Integer Base Example

Showing the Base

Showing the Plus Sign

Showing Upper Case Hex Ints

Setting the Width

Setting the Fill Character

Justification

Decimal Points in Floats

Format of Float

Significant Digits in Float

Floating Point Format

Displaying bools

Manipulators

Output Manipulators (no args)

Output Manipulators (1 arg)

Input Status Flags

Testing Status Flags

Testing Status Flags

Integer Input

Character Input

String Input

String Input with Whitespace

File Input/Output

Opening Files

Opening Output Files

Closing a File

File Example

File Example (cont)

Author: Richard Maclin

Email: rmaclin@d.umn.edu

Home Page: http://www.d.umn.edu/~rmaclin/

Download presentation source