// File: param.cxx
// Written by Michael Main
// This program demonstrates the difference between value parameters
// (in what1) and reference parameters (in what2).

#include <cstdlib>
#include <iostream>
using namespace std;

void what1(int x);

//--------------------------------------------------------------------
int main( )
{
    int m = 21;

    cout << "Initial value of m: " << m << endl;
    what1(m);
    cout << "New value of m: " << m << endl;

    return EXIT_SUCCESS;
}
//--------------------------------------------------------------------

//--------------------------------------------------------------------
void what1(int x)
{
    x = 2 * x;
}
//--------------------------------------------------------------------
