I have this code:
void ShapeArr::publishStats()
{
double ap = 0.0;
for (int i=0; i < currCount; i++)
{
Shape *s = arr[i];
ap += s->getAPRatio();
}
cout << "Max APRatio = " << [B]???[/B] << " Average APRatio = " << ap/currCount << endl;
}
What do I need to do to actually calculate the MAX APRatio? "getAPRatio" is being called 3-4 times and returning a single integer each time. Of the 3 or 4 times it's called, I need to somehow compare them and take the biggest one as my max. I think the average is set correctly, but I'm not sure how to separate them and compare them to get the max. Any help??