{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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
Stream Manipulators String Streams Streams, Part 2: Stream Manipulators and String Streams A. Barbaro UCLA PIC 10B
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
Stream Manipulators String Streams Outline for Today: Streams (9.3-9.4 of Big C++ ) 1 Stream Manipulators 2 String Streams
Background image of page 2
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
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
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;
Background image of page 4
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;
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
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 )
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}