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

  1.  
  2.     1    #include <stream.h>
  3.     2    
  4.     3    void swap1(int x, int y);
  5.     4    void swap2(int &x, int &y);
  6.     5    void swap3(int *x, int *y);
  7.     6        
  8.     7    main()
  9.     8    {
  10.     9        int i = 3;
  11.    10        int j = 4;
  12.    11    
  13.    12        swap1(i , j);
  14.    13        cout << i << " " << j << "\n";
  15.    14        
  16.    15        swap2(i , j);
  17.    16        cout << i << " " << j << "\n";
  18.    17    
  19.    18        swap3(&i , &j);
  20.    19        cout << i << " " << j << "\n";
  21.    20    }
  22.  
  23.