PIC10B_lecture8

PIC10B_lecture8 - Stream Manipulators String Streams...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Stream Manipulators String Streams Streams, Part 2: Stream Manipulators and String Streams A. Barbaro UCLA PIC 10B Stream Manipulators String Streams Outline for Today: Streams (9.3-9.4 of Big C++ ) 1 Stream Manipulators 2 String Streams Stream Manipulators String Streams Stream Manipulators Manipulator Purpose Example setw( int n ) Sets field width of next item only out << setw(6) << 567; All others work forever after Stream Manipulators String Streams Stream Manipulators Manipulator Purpose Example setw( int n ) Sets field width of next item only out << setw(6) << 567; All others work forever after setfill( char ch ) Sets fill character to ch out << setfill(0) << setw(6) << 567; Stream Manipulators String Streams Stream Manipulators Manipulator Purpose Example setw( int n ) Sets field width of next item only out << setw(6) << 567; All others work forever after setfill( char ch ) Sets fill character to ch out << setfill(0) << setw(6) << 567; left Left alignment out << left << setw(6) << 567; Stream Manipulators String Streams Stream Manipulators Manipulator Purpose Example setw( int n ) Sets field width of next item only out << setw(6) << 567; All others work forever after setfill( char ch )...
View Full Document

This note was uploaded on 10/23/2011 for the course PIC 10B taught by Professor Wittman during the Winter '08 term at UCLA.

Page1 / 14

PIC10B_lecture8 - Stream Manipulators String Streams...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online