function definition return type?
In the following code (a function definition) CurrencyList is the name of a class. Is the first CurrencyList in the code a return type? If so, what does it mean for the return type to be of a class type? Does it mean an object of the class will be returned?
Code:
CurrencyList CurrencyList :: perfectChange(int amountToChange) const
{
int amt(size_);
for (int i = 0; i<size_; i++)
divMod(amountToChange, denom_[i].value, amt[i], amountToChange);
return CurrencyList(amt);
}