In this sentence
top = &top -> TopVal(stocks[st]); ^^^
The address operator used is & . In C ++, many characters are overloaded and have several meanings depending on the context. Thus, for example, the * symbol can mean a binary multiplication operator, a pointer dereference operator, and be used in declarations to declare a pointer.
In turn, the & symbol can mean an address taking statement, as in the program you cited, a link when declaring links, as well as a binary bit AND operator.
So, in this declaration, the member function
const Stock & Stock::TopVal(const Stock & _st) const ^^^ ^^^ { if (_st.total_val > total_val) return _st; else return *this; }
symbol & used to advertise links. The function returns a reference to an object of type const Stock , and also declares as a parameter a reference to an object of such type const Stock .
And in this sentence
top = &top -> TopVal(stocks[st]); ^^^
top , which is most likely declared as
const Stock *top;
the address of the object, the link to which is returned from the function, is assigned.
To make it clearer, consider the following example.
int x = 10; int &r = x; int *p = &x; r = 20; *p = 30;
In this example, the reference r declared to the object x and the pointer p , which will contain the address of the object x . A link can be considered as an alternative object name - as an object alias. You can refer to the memory area where the object x is located by the original name x , or by using the name r .