// secref.cpp -- defining and using a reference
#include <iostream>
using namespace std;
int main()
{
    int rats = 101;
    int & rodents = rats;   // rodents is a reference

    cout << "rats = " << rats;
    cout << ", rodents = " << rodents << "\n";

    cout << "rats address = " << &rats;
    cout << ", rodents address = " << &rodents << "\n";

    int bunnies = 50;
    rodents = bunnies;       // can we change the reference?
    cout << "bunnies = " << bunnies;
    cout << ", rats = " << rats;
    cout << ", rodents = " << rodents << "\n";

    cout << "bunnies address = " << &bunnies;
    cout << ", rodents address = " << &rodents << "\n";
    return 0;
}

