File:  [WindowsNT SDKs] / mstools / samples / iostutor / exios105.cpp
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:21:48 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntsdk-oct-1992, ntsdk-nov-1993, ntsdk-jul-1993, HEAD
Microsoft Windows NT Build 328 10-12-1992

// exios105.cpp
// The setiosflags and resetiosflags manipulators
#include <iostream.h>
#include <iomanip.h>

void main()
{
   double values[] = { 1.23, 35.36, 653.7, 4358.24 };
   char *names[] = { "Zoot", "Jimmy", "Al", "Stan "};
   for ( int i = 0; i < 4; i++ )
      cout << setiosflags( ios::left )
           << setw( 6 )  << names[i]
           << resetiosflags( ios::left )
           << setw( 10 ) << values[i] << endl;
}

unix.superglobalmegacorp.com

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