The '&' has different meanings in different contexts. For your assignment, it sounds like you can focus on its meaning when used to indicate the type of a variable as being a reference.
Code:
void squareIt(int& value)
{
value = value * value;
}
int main()
{
int var = 3;
squareIt(var);
// var is now equal to 9.
}
In the above example, the function squareIt takes a single argument. That argument is an integer reference. When the function is called, the variable var is passed by reference to the function. This means that any changes made to the argument in squareIt automatically happens to var as well.
Code:
int doubleIt(int value)
{
value = value + value;
return value;
}
int main()
{
int var = 3;
int result = doubleIt(var);
// var is still 3.
// result is equal to 6.
}
In this example, the variable is passed by value to doubleIt. This means that a copy of the value is made for the function to use. So any changes you make to value do not affect var.
As a general rule (not for this assignment, obviously) you pass simple built-in types like int, double and char by value. If you want to return a result, you return it rather than using a reference unless you have to return more than one value or unless you make it extra clear that your function will change the value of the variable.
When you use more complicate classes you pass by const reference so that you don't make a copy of data unnecessarily. If you want to actually modify the value of the object, then you pass by non-const reference, again being sure that it is clear that you will be modifying the object.