home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_07_07 / v7n7025a.txt < prev    next >
Text File  |  1989-09-05  |  454b  |  25 lines

  1.  
  2.    44    void error(const char *msg)
  3.    45    {
  4.    46        cerr << msg << "\n";
  5.    47        exit(1);
  6.    48    }
  7.    49    
  8.    50    
  9.    51    main()
  10.    52    {
  11.    53        Array v(100);
  12.    54    
  13.    55        v.value(3) = 1111;
  14.    56        v[5] = 2 * v.value(3);
  15.    57        v.value(7) = 2 * v[5];
  16.    58        v[9] = 2 * v[11];
  17.    59    
  18.    60        cout << v << "\n";
  19.    61    
  20.    62        int x = v[7];
  21.    63        int &y = x;
  22.    64        cout << x << " " << y << "\n";
  23.    65    }
  24.  
  25.