|
|
1.1 ! root 1: // exios105.cpp ! 2: // The setiosflags and resetiosflags manipulators ! 3: #include <iostream.h> ! 4: #include <iomanip.h> ! 5: ! 6: void main() ! 7: { ! 8: double values[] = { 1.23, 35.36, 653.7, 4358.24 }; ! 9: char *names[] = { "Zoot", "Jimmy", "Al", "Stan "}; ! 10: for ( int i = 0; i < 4; i++ ) ! 11: cout << setiosflags( ios::left ) ! 12: << setw( 6 ) << names[i] ! 13: << resetiosflags( ios::left ) ! 14: << setw( 10 ) << values[i] << endl; ! 15: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.