In getlargest() count will act as the index of the element with the largest rainfall for that year. Since count is passed to getlargest() by reference you don't need to return anything if there are no other requirements of the function. Use some counter variable other than count to control the loop and keep track of count separately.
void getLargest(double array[], int size, int &count)
{
count = 0; //assume first element is largest
for (int i = 1; i < size; i++)
{
if (array[i] > array[count])
{
count = i;
}
}
}
and back in main() use count to display the result;
cout << "the largerst rainfall was " << array[count];