using namespace std;
int a=5, b=20, c=15;
//globals a,b,c have scope here, and anywhere else in this program.
void brainmelting(int x, int &y, int &z)
//globals a,b,c have scope here
//copy of x is made, which starts its scope here and ends at the end of this function
//reference of y and z is used here. It will be viewable by main() since we passed the address (reference)
int b=10; //This local b will now take over. Global b is now "ignored"!
//The copy of x is now destroyed, since it was passed-by-value
//The values of y and z are preserved and "stored" into whatever names they were in main().
//Global variables a, b, c have scope here
int a=100; //This variable is now used as a. Global "a" is now ignored.
brainmelting(a,b,c); //pass these variables; once we get inside the function, we don't care what they were called. They could've been donkey, giraffe, and platypus for all we care. We're just passing the integers, not the "name"