Annotation of mstools/samples/iostutor/exios107.cpp, revision 1.1.1.1

1.1       root        1: // exios107.cpp
                      2: // The fixed flag
                      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:    cout << setiosflags( ios::fixed );
                     11:    for ( int i = 0; i < 4; i++ )
                     12:       cout << setiosflags( ios::left )
                     13:            << setw( 6  )  
                     14:            << names[i]
                     15:            << resetiosflags( ios::left )
                     16:            << setw( 10 ) 
                     17:            << setprecision( 1 )
                     18:            << values[i] 
                     19:            << endl;
                     20: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.