Please send questions to
st10@humboldt.edu .
#include <iostream>
#include "swap.h"
using namespace std;
// quick'n'ugly demo of function swap
//
// by: Sharon M. Tuttle
// last modified: 10-28-03
int main()
{
// declare variables
int x, y;
// initialize variables
x = 18;
y = 35;
// what are their values before the attempt to swap?
cout << "BEFORE: x: " << x << " y: " << y << endl;
// try to swap their values --- make x have
// y's value, and y have x's value
swap(x, y);
// what are their values after the attempt?
cout << "AFTER: x: " << x << " y: " << y << endl;
return 0;
}